public class BlobImpl
extends java.lang.Object
implements java.sql.Blob
Modifier and Type | Method and Description |
---|---|
void |
free() |
java.io.InputStream |
getBinaryStream()
Returns the blob as a stream.
|
java.io.InputStream |
getBinaryStream(long pos,
long length) |
byte[] |
getBytes(long pos,
int length)
Returns a subset of the bytes.
|
long |
length()
Returns the length of the blob
|
long |
position(java.sql.Blob pattern,
long start)
Returns the position in the blob where the pattern starts.
|
long |
position(byte[] pattern,
long start)
Returns the position in the blob where the pattern starts.
|
java.io.OutputStream |
setBinaryStream(long pos)
Returns a stream to write to the blob.
|
int |
setBytes(long pos,
byte[] bytes)
Sets a subset of bytes.
|
int |
setBytes(long pos,
byte[] bytes,
int offset,
int length)
Sets a subset of bytes.
|
java.lang.String |
toString() |
void |
truncate(long length)
Truncates the blob
|
void |
writeToStream(java.io.OutputStream out) |
public java.io.InputStream getBinaryStream() throws java.sql.SQLException
getBinaryStream
in interface java.sql.Blob
java.sql.SQLException
public byte[] getBytes(long pos, int length) throws java.sql.SQLException
getBytes
in interface java.sql.Blob
java.sql.SQLException
public long length() throws java.sql.SQLException
length
in interface java.sql.Blob
java.sql.SQLException
public void writeToStream(java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public long position(java.sql.Blob pattern, long start) throws java.sql.SQLException
position
in interface java.sql.Blob
java.sql.SQLException
public long position(byte[] pattern, long start) throws java.sql.SQLException
position
in interface java.sql.Blob
java.sql.SQLException
public java.io.OutputStream setBinaryStream(long pos) throws java.sql.SQLException
setBinaryStream
in interface java.sql.Blob
java.sql.SQLException
public int setBytes(long pos, byte[] bytes) throws java.sql.SQLException
setBytes
in interface java.sql.Blob
java.sql.SQLException
public int setBytes(long pos, byte[] bytes, int offset, int length) throws java.sql.SQLException
setBytes
in interface java.sql.Blob
java.sql.SQLException
public void truncate(long length) throws java.sql.SQLException
truncate
in interface java.sql.Blob
java.sql.SQLException
public void free() throws java.sql.SQLException
free
in interface java.sql.Blob
java.sql.SQLException
public java.io.InputStream getBinaryStream(long pos, long length) throws java.sql.SQLException
getBinaryStream
in interface java.sql.Blob
java.sql.SQLException
public java.lang.String toString()
toString
in class java.lang.Object