Top Description Inners Fields Constructors Methods
org.h2.jdbc

public abstract Class JdbcLob

extends TraceObject
Class Inheritance
Known Direct Subclasses
org.h2.jdbc.JdbcSQLXML, org.h2.jdbc.JdbcBlob, org.h2.jdbc.JdbcClob
Imports
java.io.IOException, .InputStream, .PipedInputStream, .PipedOutputStream, .Reader, .Writer, java.sql.SQLException, org.h2.api.ErrorCode, org.h2.message.DbException, .TraceObject, org.h2.mvstore.DataUtils, org.h2.util.IOUtils, .Task, org.h2.value.Value

Represents a large object value.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
public static enum
JdbcLob.State

State of the object.

Field Summary

Modifier and TypeField and Description
pack-priv final JdbcConnection
conn

JDBC connection.

pack-priv JdbcLob.State
state

State.

pack-priv Value
value

Value.

Inherited from org.h2.message.TraceObject:
ARRAYBLOBCALLABLE_STATEMENTCLOBCONNECTIONDATA_SOURCEDATABASE_META_DATAPARAMETER_META_DATAPREPARED_STATEMENTRESULT_SETRESULT_SET_META_DATASAVEPOINTSQLXMLSTATEMENTtraceXA_DATA_SOURCEXID

Constructor Summary

AccessConstructor and Description
pack-priv
JdbcLob(JdbcConnection conn, Value value, JdbcLob.State state, int type, int id)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
checkClosed()

Check that connection and LOB is not closed, otherwise throws exception with error code org.h2.api.ErrorCode#OBJECT_CLOSED.

pack-priv void
checkEditable()

Check the state of the LOB and throws the exception when check failed (set is supported only for a new LOB).

pack-priv void
checkReadable()

Check the state of the LOB and throws the exception when check failed (the LOB must be set completely before read).

pack-priv void
completeWrite(Value
LOB value.
blob
)

Change the state LOB state (LOB value is set completely and available to read).

public void
free()

Release all resources of this object.

pack-priv InputStream

Returns:

the input stream
getBinaryStream
()

Returns the input stream.

pack-priv Reader

Returns:

the reader
getCharacterStream
()

Returns the reader.

pack-priv Writer

Returns:

Writer.
setCharacterStreamImpl
()

Returns the writer.

pack-priv JdbcLob.LobPipedOutputStream

Returns:

Output stream..
setClobOutputStreamImpl
()

Returns the writer stream.

public String
toString()

Overrides java.lang.Object.toString.

INTERNAL

Inherited from org.h2.message.TraceObject:
debugCodedebugCodeAssigndebugCodeCalldebugCodeCalldebugCodeCallgetNextIdgetTraceIdgetTraceObjectNameisDebugEnabledisInfoEnabledlogAndConvertquotequoteArrayquoteBigDecimalquoteBytesquoteDatequoteIntArrayquoteMapquoteTimequoteTimestampsetTraceunsupported

Field Detail

connback to summary
pack-priv final JdbcConnection conn

JDBC connection.

stateback to summary
pack-priv JdbcLob.State state

State.

valueback to summary
pack-priv Value value

Value.

Constructor Detail

JdbcLobback to summary
pack-priv JdbcLob(JdbcConnection conn, Value value, JdbcLob.State state, int type, int id)

Method Detail

checkClosedback to summary
pack-priv void checkClosed()

Check that connection and LOB is not closed, otherwise throws exception with error code org.h2.api.ErrorCode#OBJECT_CLOSED.

checkEditableback to summary
pack-priv void checkEditable()

Check the state of the LOB and throws the exception when check failed (set is supported only for a new LOB).

checkReadableback to summary
pack-priv void checkReadable() throws SQLException, IOException

Check the state of the LOB and throws the exception when check failed (the LOB must be set completely before read).

Exceptions
SQLException:
on SQL exception
IOException:
on I/O exception
completeWriteback to summary
pack-priv void completeWrite(Value blob)

Change the state LOB state (LOB value is set completely and available to read).

Parameters
blob:Value

LOB value.

freeback to summary
public void free()

Release all resources of this object.

getBinaryStreamback to summary
pack-priv InputStream getBinaryStream() throws SQLException

Returns the input stream.

Returns:InputStream

the input stream

Exceptions
SQLException:
on failure
getCharacterStreamback to summary
pack-priv Reader getCharacterStream() throws SQLException

Returns the reader.

Returns:Reader

the reader

Exceptions
SQLException:
on failure
setCharacterStreamImplback to summary
pack-priv Writer setCharacterStreamImpl() throws IOException

Returns the writer.

Returns:Writer

Writer.

Exceptions
IOException:
If an I/O error occurs.
setClobOutputStreamImplback to summary
pack-priv JdbcLob.LobPipedOutputStream setClobOutputStreamImpl() throws IOException

Returns the writer stream.

Returns:JdbcLob.LobPipedOutputStream

Output stream..

Exceptions
IOException:
If an I/O error occurs.
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

INTERNAL

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override
org.h2.jdbc back to summary

pack-priv final Class JdbcLob.LobPipedOutputStream

extends PipedOutputStream
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Task

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides java.io.PipedOutputStream.close.

Implements java.io.Closeable.close.

Closes this piped output stream and releases any system resources associated with this stream.

Inherited from java.io.PipedOutputStream:
connectflushwritewrite

Field Detail

taskback to summary
private final Task task

Constructor Detail

LobPipedOutputStreamback to summary
pack-priv LobPipedOutputStream(PipedInputStream snk, Task task) throws IOException

Method Detail

closeback to summary
public void close() throws IOException

Overrides java.io.PipedOutputStream.close.

Implements java.io.Closeable.close.

Doc from java.io.PipedOutputStream.close.

Closes this piped output stream and releases any system resources associated with this stream. This stream may no longer be used for writing bytes.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
org.h2.jdbc back to summary

public final Enum JdbcLob.State

extends Enum<JdbcLob.State>
Class Inheritance

State of the object.

Field Summary

Modifier and TypeField and Description
public static final JdbcLob.State
CLOSED

Object is closed.

public static final JdbcLob.State
NEW

New object without a value.

public static final JdbcLob.State
SET_CALLED

One of setter methods is invoked, but stream is not closed yet.

public static final JdbcLob.State
WITH_VALUE

A value is set.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static JdbcLob.State
public static JdbcLob.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CLOSEDback to summary
public static final JdbcLob.State CLOSED

Object is closed.

NEWback to summary
public static final JdbcLob.State NEW

New object without a value.

SET_CALLEDback to summary
public static final JdbcLob.State SET_CALLED

One of setter methods is invoked, but stream is not closed yet.

WITH_VALUEback to summary
public static final JdbcLob.State WITH_VALUE

A value is set.

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static JdbcLob.State valueOf(String name)
valuesback to summary
public static JdbcLob.State[] values()