Package org.h2.jdbc
Class JdbcClob
java.lang.Object
org.h2.message.TraceObject
org.h2.jdbc.JdbcLob
org.h2.jdbc.JdbcClob
Represents a CLOB value.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.h2.jdbc.JdbcLob
JdbcLob.State -
Field Summary
Fields inherited from class org.h2.message.TraceObject
ARRAY, BLOB, CALLABLE_STATEMENT, CLOB, CONNECTION, DATA_SOURCE, DATABASE_META_DATA, PARAMETER_META_DATA, PREPARED_STATEMENT, RESULT_SET, RESULT_SET_META_DATA, SAVEPOINT, SQLXML, STATEMENT, trace, XA_DATA_SOURCE, XID -
Constructor Summary
ConstructorsConstructorDescriptionJdbcClob(JdbcConnection conn, org.h2.value.Value value, JdbcLob.State state, int id) INTERNAL -
Method Summary
Modifier and TypeMethodDescriptionReturns the input stream.getCharacterStream(long pos, long length) Returns the reader, starting from an offset.getSubString(long pos, int length) Returns a substring.longlength()Returns the length.long[Not supported] Searches a pattern and return the position.long[Not supported] Searches a pattern and return the position.setAsciiStream(long pos) [Not supported] Returns an output stream.setCharacterStream(long pos) Get a writer to update the Clob.intFills the Clob.intFills the Clob.voidtruncate(long len) [Not supported] Truncates the object.Methods inherited from class org.h2.message.TraceObject
debugCode, debugCodeAssign, debugCodeCall, debugCodeCall, debugCodeCall, getNextId, getTraceId, getTraceObjectName, isDebugEnabled, isInfoEnabled, logAndConvert, quote, quoteArray, quoteBigDecimal, quoteBytes, quoteDate, quoteIntArray, quoteMap, quoteTime, quoteTimestamp, setTrace, unsupported
-
Constructor Details
-
JdbcClob
INTERNAL- Parameters:
conn- it belongs tovalue- ofstate- of the LOBid- of the trace object
-
-
Method Details
-
length
Returns the length.- Specified by:
lengthin interfaceClob- Returns:
- the length
- Throws:
SQLException
-
truncate
[Not supported] Truncates the object.- Specified by:
truncatein interfaceClob- Throws:
SQLException
-
getAsciiStream
Returns the input stream.- Specified by:
getAsciiStreamin interfaceClob- Returns:
- the input stream
- Throws:
SQLException
-
setAsciiStream
[Not supported] Returns an output stream.- Specified by:
setAsciiStreamin interfaceClob- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStreamin interfaceClob- Throws:
SQLException
-
setCharacterStream
Get a writer to update the Clob. This is only supported for new, empty Clob objects that were created with Connection.createClob() or createNClob(). The Clob is created in a separate thread, and the object is only updated when Writer.close() is called. The position must be 1, meaning the whole Clob data is set.- Specified by:
setCharacterStreamin interfaceClob- Parameters:
pos- where to start writing (the first character is at position 1)- Returns:
- a writer
- Throws:
SQLException
-
getSubString
Returns a substring.- Specified by:
getSubStringin interfaceClob- Parameters:
pos- the position (the first character is at position 1)length- the number of characters- Returns:
- the string
- Throws:
SQLException
-
setString
Fills the Clob. This is only supported for new, empty Clob objects that were created with Connection.createClob() or createNClob(). The position must be 1, meaning the whole Clob data is set.- Specified by:
setStringin interfaceClob- Parameters:
pos- where to start writing (the first character is at position 1)str- the string to add- Returns:
- the length of the added text
- Throws:
SQLException- on failure
-
setString
Fills the Clob. This is only supported for new, empty Clob objects that were created with Connection.createClob() or createNClob(). The position must be 1, meaning the whole Clob data is set.- Specified by:
setStringin interfaceClob- Parameters:
pos- where to start writing (the first character is at position 1)str- the string to addoffset- the string offsetlen- the number of characters to read- Returns:
- the length of the added text
- Throws:
SQLException
-
position
[Not supported] Searches a pattern and return the position.- Specified by:
positionin interfaceClob- Throws:
SQLException
-
position
[Not supported] Searches a pattern and return the position.- Specified by:
positionin interfaceClob- Throws:
SQLException
-
getCharacterStream
Returns the reader, starting from an offset.- Specified by:
getCharacterStreamin interfaceClob- Parameters:
pos- 1-based offsetlength- length of requested area- Returns:
- the reader
- Throws:
SQLException
-