|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.as400.access.AS400JDBCClobLocator
The AS400JDBCClobLocator class provides access to character large objects. The data is valid only within the current transaction.
Method Summary | |
java.io.InputStream |
getAsciiStream()
Returns the entire CLOB as a stream of ASCII characters. |
java.io.Reader |
getCharacterStream()
Returns the entire CLOB as a character stream. |
java.lang.String |
getSubString(long start,
int length)
Returns part of the contents of the CLOB. |
long |
length()
Returns the length of the CLOB. |
long |
position(java.sql.Clob pattern,
long start)
Returns the position at which a pattern is found in the CLOB. |
long |
position(java.lang.String pattern,
long start)
Returns the position at which a pattern is found in the CLOB. |
java.io.OutputStream |
setAsciiStream(long positionToStartWriting)
Returns a stream that an application can use to write Ascii characters to this CLOB. |
java.io.Writer |
setCharacterStream(long positionToStartWriting)
Returns a stream that an application can use to write a stream of Unicode characters to this CLOB. |
int |
setString(long positionToStartWriting,
java.lang.String string)
Writes a String to this CLOB, starting at position positionToStartWriting. |
int |
setString(long positionToStartWriting,
java.lang.String string,
int offset,
int lengthOfWrite)
Writes a String to this CLOB, starting at position positionToStartWriting 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 |
Method Detail |
public java.io.InputStream getAsciiStream() throws java.sql.SQLException
getAsciiStream
in interface java.sql.Clob
java.sql.SQLException
- If an error occurs.public java.io.Reader getCharacterStream() throws java.sql.SQLException
getCharacterStream
in interface java.sql.Clob
java.sql.SQLException
- If an error occurs.public java.lang.String getSubString(long start, int length) throws java.sql.SQLException
getSubString
in interface java.sql.Clob
start
- The position within the CLOB (1-based).length
- The length to return.java.sql.SQLException
- If the position is not valid,
if the length is not valid,
or an error occurs.public long length() throws java.sql.SQLException
length
in interface java.sql.Clob
java.sql.SQLException
- If an error occurs.public long position(java.lang.String pattern, long start) throws java.sql.SQLException
position
in interface java.sql.Clob
pattern
- The pattern.start
- The position within the CLOB to begin
searching (1-based).java.sql.SQLException
- If the pattern is null,
the position is not valid,
or an error occurs.public long position(java.sql.Clob pattern, long start) throws java.sql.SQLException
position
in interface java.sql.Clob
pattern
- The pattern.start
- The position within the CLOB to begin
searching (1-based).java.sql.SQLException
- If the pattern is null,
the position is not valid,
or an error occurs.public java.io.OutputStream setAsciiStream(long positionToStartWriting) throws java.sql.SQLException
positionToStartWriting
- The position (1-based) in the CLOB where writes should start.java.sql.SQLException
- If there is an error accessing the CLOB or if the position
specified is greater than the length of the CLOB.public java.io.Writer setCharacterStream(long positionToStartWriting) throws java.sql.SQLException
positionToStartWriting
- The position (1-based) in the CLOB where writes should start.java.sql.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 positionToStartWriting, java.lang.String string) throws java.sql.SQLException
positionToStartWriting
- The position (1-based) in the CLOB where writes should start.stringToWrite
- The string that will be written to the CLOB.java.sql.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 positionToStartWriting, java.lang.String string, int offset, int lengthOfWrite) throws java.sql.SQLException
positionToStartWriting
- 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 (1-based).lengthOfWrite
- The number of characters to write.java.sql.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 java.sql.SQLException
lengthOfCLOB
- The length, in characters, that this CLOB should be after
truncation.java.sql.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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |