net.sourceforge.jtds.jdbc
Class BlobImpl
java.lang.Object
net.sourceforge.jtds.jdbc.BlobImpl
- Blob
public class BlobImpl
extends java.lang.Object
implements Blob
An in-memory or disk based representation of binary data.
$Id: BlobImpl.java,v 1.31 2007/07/08 21:38:13 bheineman Exp $- Brian Heineman
- Mike Hutchinson
EMPTY_BLOB
private static final byte[] EMPTY_BLOB
0 length byte[]
as initial value for empty
Blob
s.
blobBuffer
private final BlobBuffer blobBuffer
The underlying BlobBuffer
.
BlobImpl
(package private) BlobImpl(ConnectionJDBC2 connection)
Constructs a new empty Blob
instance.
connection
- a reference to the parent connection object
BlobImpl
(package private) BlobImpl(ConnectionJDBC2 connection,
byte[] bytes)
Constructs a new Blob
instance initialized with data.
connection
- a reference to the parent connection objectbytes
- the blob object to encapsulate
getBinaryStream
public InputStream getBinaryStream()
throws SQLException
getBytes
public byte[] getBytes(long pos,
int length)
throws SQLException
length
public long length()
throws SQLException
position
public long position(Blob pattern,
long start)
throws SQLException
position
public long position(byte[] pattern,
long start)
throws SQLException
setBinaryStream
public OutputStream setBinaryStream(long pos)
throws SQLException
setBytes
public int setBytes(long pos,
byte[] bytes)
throws SQLException
setBytes
public int setBytes(long pos,
byte[] bytes,
int offset,
int len)
throws SQLException
truncate
public void truncate(long len)
throws SQLException
Generated on June 12 2008