org.firebirdsql.jdbc
Class FBCachedBlob
java.lang.Object
org.firebirdsql.jdbc.FBCachedBlob
- Blob, FirebirdBlob
public class FBCachedBlob
extends java.lang.Object
This class represents a cached blob field.
FBCachedBlob(byte[] data) - Create an instance using the cached data.
|
FirebirdBlob | detach()
|
InputStream | getBinaryStream() - Get contents of blob as binary stream.
|
byte[] | getBytes(long pos, int length) - Get part of the blob field.
|
boolean | isSegmented()
|
long | length() - Get the length of the cached blob field.
|
long | position(Blob pattern, long start) - Find the first entry of the specified pattern.
|
long | position(byte[] pattern, long start) - Find the first entry of the specified pattern.
|
OutputStream | setBinaryStream(long pos) - Set the contents of blob as binary stream.
|
int | setBytes(long l, abyte0[] ) - Set contents of the blob.
|
int | setBytes(long l, abyte0[] , int i, int j) - Set the contents of blob.
|
void | truncate(long length) - Truncate the blob to specified length.
|
FBCachedBlob
public FBCachedBlob(byte[] data)
Create an instance using the cached data.
data
- array of bytes containing the cached data.
getBinaryStream
public InputStream getBinaryStream()
throws SQLException
Get contents of blob as binary stream.
getBytes
public byte[] getBytes(long pos,
int length)
throws SQLException
Get part of the blob field.
pos
- starting position to copy.length
- amount of bytes to copy.
length
public long length()
throws SQLException
Get the length of the cached blob field.
- length of the cached blob field or -1 if the field is null.
position
public long position(Blob pattern,
long start)
throws SQLException
Find the first entry of the specified pattern.
position
public long position(byte[] pattern,
long start)
throws SQLException
Find the first entry of the specified pattern.
setBinaryStream
public OutputStream setBinaryStream(long pos)
throws SQLException
Set the contents of blob as binary stream.
- setBinaryStream in interface FirebirdBlob
setBytes
public int setBytes(long l,
abyte0[] )
throws SQLException
Set contents of the blob.
setBytes
public int setBytes(long l,
abyte0[] ,
int i,
int j)
throws SQLException
Set the contents of blob.
truncate
public void truncate(long length)
throws SQLException
Truncate the blob to specified length.
Copyright B) 2001 David Jencks and other authors. All rights reserved.