public class BlobImpl
extends java.lang.Object
implements java.sql.Blob
| Modifier and Type | Field and Description |
|---|---|
private BlobBuffer |
blobBuffer
The underlying
BlobBuffer. |
private static byte[] |
EMPTY_BLOB
0 length
byte[] as initial value for empty
Blobs. |
| Constructor and Description |
|---|
BlobImpl(JtdsConnection connection)
Constructs a new empty
Blob instance. |
BlobImpl(JtdsConnection connection,
byte[] bytes)
Constructs a new
Blob instance initialized with data. |
| Modifier and Type | Method and Description |
|---|---|
void |
free() |
java.io.InputStream |
getBinaryStream() |
java.io.InputStream |
getBinaryStream(long pos,
long length) |
byte[] |
getBytes(long pos,
int length) |
long |
length() |
long |
position(java.sql.Blob pattern,
long start) |
long |
position(byte[] pattern,
long start) |
java.io.OutputStream |
setBinaryStream(long pos) |
int |
setBytes(long pos,
byte[] bytes) |
int |
setBytes(long pos,
byte[] bytes,
int offset,
int len) |
void |
truncate(long len) |
private static final byte[] EMPTY_BLOB
byte[] as initial value for empty
Blobs.private final BlobBuffer blobBuffer
BlobBuffer.BlobImpl(JtdsConnection connection)
Blob instance.connection - a reference to the parent connection objectBlobImpl(JtdsConnection connection, byte[] bytes)
Blob instance initialized with data.connection - a reference to the parent connection objectbytes - the blob object to encapsulatepublic java.io.InputStream getBinaryStream()
throws java.sql.SQLException
getBinaryStream in interface java.sql.Blobjava.sql.SQLExceptionpublic byte[] getBytes(long pos,
int length)
throws java.sql.SQLException
getBytes in interface java.sql.Blobjava.sql.SQLExceptionpublic long length()
throws java.sql.SQLException
length in interface java.sql.Blobjava.sql.SQLExceptionpublic long position(byte[] pattern,
long start)
throws java.sql.SQLException
position in interface java.sql.Blobjava.sql.SQLExceptionpublic long position(java.sql.Blob pattern,
long start)
throws java.sql.SQLException
position in interface java.sql.Blobjava.sql.SQLExceptionpublic java.io.OutputStream setBinaryStream(long pos)
throws java.sql.SQLException
setBinaryStream in interface java.sql.Blobjava.sql.SQLExceptionpublic int setBytes(long pos,
byte[] bytes)
throws java.sql.SQLException
setBytes in interface java.sql.Blobjava.sql.SQLExceptionpublic int setBytes(long pos,
byte[] bytes,
int offset,
int len)
throws java.sql.SQLException
setBytes in interface java.sql.Blobjava.sql.SQLExceptionpublic void truncate(long len)
throws java.sql.SQLException
truncate in interface java.sql.Blobjava.sql.SQLExceptionpublic void free()
throws java.sql.SQLException
free in interface java.sql.Blobjava.sql.SQLExceptionpublic java.io.InputStream getBinaryStream(long pos,
long length)
throws java.sql.SQLException
getBinaryStream in interface java.sql.Blobjava.sql.SQLExceptionGenerated on June 8 2013