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
ConstructorDescriptionJdbcClob
(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.long
length()
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.int
Fills the Clob.int
Fills the Clob.void
truncate
(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:
length
in interfaceClob
- Returns:
- the length
- Throws:
SQLException
-
truncate
[Not supported] Truncates the object.- Specified by:
truncate
in interfaceClob
- Throws:
SQLException
-
getAsciiStream
Returns the input stream.- Specified by:
getAsciiStream
in interfaceClob
- Returns:
- the input stream
- Throws:
SQLException
-
setAsciiStream
[Not supported] Returns an output stream.- Specified by:
setAsciiStream
in interfaceClob
- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStream
in 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:
setCharacterStream
in 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:
getSubString
in 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:
setString
in 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:
setString
in 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:
position
in interfaceClob
- Throws:
SQLException
-
position
[Not supported] Searches a pattern and return the position.- Specified by:
position
in interfaceClob
- Throws:
SQLException
-
getCharacterStream
Returns the reader, starting from an offset.- Specified by:
getCharacterStream
in interfaceClob
- Parameters:
pos
- 1-based offsetlength
- length of requested area- Returns:
- the reader
- Throws:
SQLException
-