Package org.h2.jdbc
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 class
static enum
State of the object. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final JdbcConnection
JDBC connection.(package private) JdbcLob.State
State.(package private) Value
Value.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
ConstructorsConstructorDescriptionJdbcLob
(JdbcConnection conn, Value value, JdbcLob.State state, int type, int id) -
Method Summary
Modifier and TypeMethodDescription(package private) void
Check that connection and LOB is not closed, otherwise throws exception with error codeErrorCode.OBJECT_CLOSED
.(package private) void
Check the state of the LOB and throws the exception when check failed (set is supported only for a new LOB).(package private) void
Check the state of the LOB and throws the exception when check failed (the LOB must be set completely before read).(package private) void
completeWrite
(Value blob) Change the state LOB state (LOB value is set completely and available to read).void
free()
Release all resources of this object.(package private) InputStream
Returns the input stream.(package private) Reader
Returns the reader.(package private) Writer
Returns the writer.(package private) JdbcLob.LobPipedOutputStream
Returns the writer stream.toString()
INTERNALMethods 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
-
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
INTERNAL
-