Package com.nuodb.jdbc
Class ValueStream
- java.lang.Object
-
- com.nuodb.jdbc.Value
-
- com.nuodb.jdbc.ValueStream
-
- All Implemented Interfaces:
TimeValues
public class ValueStream extends Value
ValueStream is a subclass of Value that replaces ValueString and ValueBytes to implement LOB streaming. It contains the object's stream identifier (a 32-bit int), and a connection to the server. When a client of ValueStreamId calls a method to extract data (getBytes, getInputStream, etc.), it will load the data from the server.
-
-
Field Summary
-
Fields inherited from class com.nuodb.jdbc.Value
Asciiblob, Binaryblob, BlobPtr, ClobPtr, Null, typeArbitrarydecimal, typeArray, typeBinChar, typeBoolean, typeBytes, typeChar, typeDate, typeDouble, typeFloat, typeInt, typeLong, typeNumber, typeShort, typeSqlTimestamp, typeStream, typeString, typeTimestamp, typeTimeType, typeVarBinChar, Varchar
-
Fields inherited from interface com.nuodb.jdbc.TimeValues
MILLISECONDS_PER_DAY, MILLISECONDS_PER_HOUR, MILLISECONDS_PER_MINUTE, MILLISECONDS_SCALE, NANOSECONDS_SCALE, SECONDS_PER_DAY, SECONDS_PER_HOUR, SECONDS_PER_MINUTE, SECONDS_SCALE
-
-
Constructor Summary
Constructors Constructor Description ValueStream(int handle, int streamType, long chunkSize, long streamSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamgetAsciiStream(SQLContext context)byte[]getBytes()byte[]getBytes(SQLContext context)ReadergetCharacterStream(SQLContext context)intgetChunksCount()longgetChunkSize()InputStreamgetInputStream()longgetStreamSize()intgetStreamType()StringgetString()voidsetResultSet(ResultSet resultSet)
-
-
-
Method Detail
-
setResultSet
public void setResultSet(ResultSet resultSet) throws SQLException
- Throws:
SQLException
-
getString
public String getString() throws SQLException
- Throws:
SQLException
-
getBytes
public byte[] getBytes(SQLContext context) throws SQLException
- Throws:
SQLException
-
getBytes
public byte[] getBytes() throws SQLException- Specified by:
getBytesin classValue- Throws:
SQLException
-
getInputStream
public InputStream getInputStream() throws SQLException
- Overrides:
getInputStreamin classValue- Throws:
SQLException
-
getAsciiStream
public InputStream getAsciiStream(SQLContext context) throws SQLException
- Overrides:
getAsciiStreamin classValue- Throws:
SQLException
-
getCharacterStream
public Reader getCharacterStream(SQLContext context) throws SQLException
- Overrides:
getCharacterStreamin classValue- Throws:
SQLException
-
getStreamType
public int getStreamType()
-
getChunkSize
public long getChunkSize()
-
getStreamSize
public long getStreamSize()
-
getChunksCount
public int getChunksCount()
-
-