Class JdbcLob
java.lang.Object
org.h2.message.TraceObject
org.h2.jdbc.JdbcLob
- Direct Known Subclasses:
JdbcBlob, JdbcClob, JdbcSQLXML
Represents a large object value.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classstatic enumState of the object. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final JdbcConnectionJDBC connection.(package private) JdbcLob.StateState.(package private) ValueValue.Fields inherited from class 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
ConstructorsConstructorDescriptionJdbcLob(JdbcConnection conn, Value value, JdbcLob.State state, int type, int id) -
Method Summary
Modifier and TypeMethodDescription(package private) voidCheck that connection and LOB is not closed, otherwise throws exception with error codeErrorCode.OBJECT_CLOSED.(package private) voidCheck the state of the LOB and throws the exception when check failed (set is supported only for a new LOB).(package private) voidCheck the state of the LOB and throws the exception when check failed (the LOB must be set completely before read).(package private) voidcompleteWrite(Value blob) Change the state LOB state (LOB value is set completely and available to read).voidfree()Release all resources of this object.(package private) InputStreamReturns the input stream.(package private) ReaderReturns the reader.(package private) WriterReturns the writer.(package private) JdbcLob.LobPipedOutputStreamReturns the writer stream.toString()INTERNALMethods inherited from class TraceObject
debugCode, debugCodeAssign, debugCodeCall, debugCodeCall, debugCodeCall, getNextId, getTraceId, getTraceObjectName, isDebugEnabled, isInfoEnabled, logAndConvert, quote, quoteArray, quoteBigDecimal, quoteBytes, quoteDate, quoteIntArray, quoteMap, quoteTime, quoteTimestamp, setTrace, unsupported
-
Field Details
-
conn
JDBC connection. -
value
Value valueValue. -
state
JdbcLob.State stateState.
-
-
Constructor Details
-
JdbcLob
JdbcLob(JdbcConnection conn, Value value, JdbcLob.State state, int type, int id)
-
-
Method Details
-
checkClosed
void checkClosed()Check that connection and LOB is not closed, otherwise throws exception with error codeErrorCode.OBJECT_CLOSED. -
checkEditable
void checkEditable()Check the state of the LOB and throws the exception when check failed (set is supported only for a new LOB). -
checkReadable
Check the state of the LOB and throws the exception when check failed (the LOB must be set completely before read).- Throws:
SQLException- on SQL exceptionIOException- on I/O exception
-
completeWrite
Change the state LOB state (LOB value is set completely and available to read).- Parameters:
blob- LOB value.
-
free
public void free()Release all resources of this object. -
getBinaryStream
Returns the input stream.- Returns:
- the input stream
- Throws:
SQLException- on failure
-
getCharacterStream
Returns the reader.- Returns:
- the reader
- Throws:
SQLException- on failure
-
setCharacterStreamImpl
Returns the writer.- Returns:
- Writer.
- Throws:
IOException- If an I/O error occurs.
-
setClobOutputStreamImpl
Returns the writer stream.- Returns:
- Output stream..
- Throws:
IOException- If an I/O error occurs.
-
toString
-