|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.as400.access.AS400JDBCClobLocator
public class AS400JDBCClobLocator extends Object implements Clob
The AS400JDBCClobLocator class provides access to character large objects. The data is valid only within the current transaction.
| Modifier and Type | Method and Description |
|---|---|
void |
free()
This method frees the Clob object and releases the
resources that it holds. |
InputStream |
getAsciiStream()
Returns the entire CLOB as a stream of ASCII characters. |
Reader |
getCharacterStream()
Returns the entire CLOB as a character stream. |
String |
getSubString(long position,
int length)
Returns part of the contents of the CLOB. |
long |
length()
Returns the length of the current contents of the CLOB in characters. |
long |
position(Clob pattern,
long position)
Returns the position at which a pattern is found in the CLOB. |
long |
position(String pattern,
long position)
Returns the position at which a pattern is found in the CLOB. |
OutputStream |
setAsciiStream(long position)
Returns a stream that an application can use to write Ascii characters to this CLOB. |
Writer |
setCharacterStream(long position)
Returns a stream that an application can use to write a stream of Unicode characters to this CLOB. |
int |
setString(long position,
String stringToWrite)
Writes a String to this CLOB, starting at position position. |
int |
setString(long position,
String string,
int offset,
int lengthOfWrite)
Writes a String to this CLOB, starting at position position in the CLOB. |
void |
truncate(long lengthOfCLOB)
Truncates this CLOB to a length of lengthOfCLOB characters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.sql.Clob |
|---|
getCharacterStream |
| Method Detail |
|---|
public void free()
throws SQLException
Clob object and releases the
resources that it holds. The object is invalid once the
free method is called. If free is called
multiple times, the subsequent calls to free are treated
as a no-op.
free in interface ClobSQLException - if an error occurs releasing the Clob's resources
public InputStream getAsciiStream()
throws SQLException
getAsciiStream in interface ClobSQLException - If an error occurs.
public Reader getCharacterStream()
throws SQLException
getCharacterStream in interface ClobSQLException - If an error occurs.
public String getSubString(long position,
int length)
throws SQLException
getSubString in interface Clobposition - The position within the CLOB (1-based).length - The number of characters to return.SQLException - If the position is not valid,
if the length is not valid,
or an error occurs.
public long length()
throws SQLException
length in interface ClobSQLException - If an error occurs.
public long position(String pattern,
long position)
throws SQLException
position in interface Clobpattern - The pattern.position - The position within the CLOB to begin
searching (1-based).SQLException - If the pattern is null,
the position is not valid,
or an error occurs.
public long position(Clob pattern,
long position)
throws SQLException
position in interface Clobpattern - The pattern.position - The position within the CLOB to begin
searching (1-based).SQLException - If the pattern is null,
the position is not valid,
or an error occurs.
public OutputStream setAsciiStream(long position)
throws SQLException
setAsciiStream in interface Clobposition - The position (1-based) in the CLOB where writes should start.SQLException - If there is an error accessing the CLOB or if the position
specified is greater than the length of the CLOB.
public Writer setCharacterStream(long position)
throws SQLException
setCharacterStream in interface Clobposition - The position (1-based) in the CLOB where writes should start.SQLException - If there is an error accessing the CLOB or if the position
specified is greater than the length of the CLOB.
public int setString(long position,
String stringToWrite)
throws SQLException
setString in interface Clobposition - The position (1-based) in the CLOB where writes should start.stringToWrite - The string that will be written to the CLOB.SQLException - If there is an error accessing the CLOB or if the position
specified is greater than the length of the CLOB.
public int setString(long position,
String string,
int offset,
int lengthOfWrite)
throws SQLException
setString in interface Clobposition - The position (1-based) in the CLOB where writes should start.string - The string that will be written to the CLOB.offset - The offset into string to start reading characters (0-based).lengthOfWrite - The number of characters to write.SQLException - If there is an error accessing the CLOB value or if the position
specified is greater than the length of the CLOB.
public void truncate(long lengthOfCLOB)
throws SQLException
truncate in interface CloblengthOfCLOB - The length, in characters, that this CLOB should be after
truncation.SQLException - If there is an error accessing the CLOB or if the length
specified is greater than the length of the CLOB.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||