public final class JdbcBlob extends JdbcLob implements java.sql.Blob
JdbcLob.State| Constructor and Description |
|---|
JdbcBlob(JdbcConnection conn,
org.h2.value.Value value,
JdbcLob.State state,
int id)
INTERNAL
|
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
getBinaryStream()
Returns the input stream.
|
java.io.InputStream |
getBinaryStream(long pos,
long length)
Returns the input stream, starting from an offset.
|
byte[] |
getBytes(long pos,
int length)
Returns some bytes of the object.
|
long |
length()
Returns the length.
|
long |
position(java.sql.Blob blobPattern,
long start)
[Not supported] Searches a pattern and return the position.
|
long |
position(byte[] pattern,
long start)
[Not supported] Searches a pattern and return the position.
|
java.io.OutputStream |
setBinaryStream(long pos)
Get a writer to update the Blob.
|
int |
setBytes(long pos,
byte[] bytes)
Fills the Blob.
|
int |
setBytes(long pos,
byte[] bytes,
int offset,
int len)
Sets some bytes of the object.
|
void |
truncate(long len)
[Not supported] Truncates the object.
|
debugCode, debugCodeAssign, debugCodeCall, debugCodeCall, debugCodeCall, getNextId, getTraceId, getTraceObjectName, isDebugEnabled, isInfoEnabled, logAndConvert, quote, quoteArray, quoteBigDecimal, quoteBytes, quoteDate, quoteIntArray, quoteMap, quoteTime, quoteTimestamp, setTrace, unsupportedpublic JdbcBlob(JdbcConnection conn, org.h2.value.Value value, JdbcLob.State state, int id)
conn - it belongs tovalue - ofstate - of the LOBid - of the trace objectpublic long length()
throws java.sql.SQLException
length in interface java.sql.Blobjava.sql.SQLExceptionpublic void truncate(long len)
throws java.sql.SQLException
truncate in interface java.sql.Bloblen - the new lengthjava.sql.SQLExceptionpublic byte[] getBytes(long pos,
int length)
throws java.sql.SQLException
getBytes in interface java.sql.Blobpos - the index, the first byte is at position 1length - the number of bytesjava.sql.SQLExceptionpublic int setBytes(long pos,
byte[] bytes)
throws java.sql.SQLException
setBytes in interface java.sql.Blobpos - where to start writing (the first byte is at position 1)bytes - the bytes to setjava.sql.SQLExceptionpublic int setBytes(long pos,
byte[] bytes,
int offset,
int len)
throws java.sql.SQLException
setBytes in interface java.sql.Blobpos - the write positionbytes - the bytes to setoffset - the bytes offsetlen - the number of bytes to writejava.sql.SQLExceptionpublic java.io.InputStream getBinaryStream()
throws java.sql.SQLException
JdbcLobgetBinaryStream in interface java.sql.Blobjava.sql.SQLException - on failurepublic java.io.OutputStream setBinaryStream(long pos)
throws java.sql.SQLException
setBinaryStream in interface java.sql.Blobpos - where to start writing (the first byte is at position 1)java.sql.SQLExceptionpublic long position(byte[] pattern,
long start)
throws java.sql.SQLException
position in interface java.sql.Blobpattern - the pattern to searchstart - the index, the first byte is at position 1java.sql.SQLExceptionpublic long position(java.sql.Blob blobPattern,
long start)
throws java.sql.SQLException
position in interface java.sql.BlobblobPattern - the pattern to searchstart - the index, the first byte is at position 1java.sql.SQLExceptionpublic java.io.InputStream getBinaryStream(long pos,
long length)
throws java.sql.SQLException
getBinaryStream in interface java.sql.Blobpos - where to start readinglength - the number of bytes that will be readjava.sql.SQLException