|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.firebirdsql.jdbc.FBCachedBlob
public class FBCachedBlob
This class represents a cached blob field.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.firebirdsql.jdbc.FirebirdBlob |
|---|
FirebirdBlob.BlobInputStream, FirebirdBlob.BlobOutputStream |
| Constructor Summary | |
|---|---|
FBCachedBlob(byte[] data)
Create an instance using the cached data. |
|
| Method Summary | |
|---|---|
FirebirdBlob |
detach()
Detach this blob. |
void |
free()
|
InputStream |
getBinaryStream()
Get contents of blob as binary stream. |
InputStream |
getBinaryStream(long pos,
long length)
|
byte[] |
getBytes(long pos,
int length)
Get part of the blob field. |
Object |
getSynchronizationObject()
Get synchronization object. |
boolean |
isSegmented()
Check if blob is segmented. |
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,
byte[] abyte0)
Set contents of the blob. |
int |
setBytes(long l,
byte[] abyte0,
int i,
int j)
Set the contents of blob. |
void |
truncate(long length)
Truncate the blob to specified length. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FBCachedBlob(byte[] data)
data - array of bytes containing the cached data.| Method Detail |
|---|
public FirebirdBlob detach()
throws SQLException
FirebirdBlobNote, detached blob will not remember the stream position of this object. This means that you cannot start reading data from the blob, then detach it, and then continue reading. Reading from detached blob will begin at the blob start.
detach in interface FirebirdBlobFirebirdBlob that is not under result set
control.
SQLException - if Blob cannot be detached.
public boolean isSegmented()
throws SQLException
FirebirdBlobFirebirdBlob.BlobInputStream.seek(int) method.
isSegmented in interface FirebirdBlobtrue if this blob is segmented,
otherwise false
SQLException
public long length()
throws SQLException
length in interface BlobSQLException
public byte[] getBytes(long pos,
int length)
throws SQLException
getBytes in interface Blobpos - starting position to copy.length - amount of bytes to copy.
SQLException
public long position(byte[] pattern,
long start)
throws SQLException
position in interface BlobSQLException - always, not yet implemented.
public long position(Blob pattern,
long start)
throws SQLException
position in interface BlobSQLException - always, not yet implemented.
public InputStream getBinaryStream()
throws SQLException
getBinaryStream in interface BlobSQLException
public int setBytes(long l,
byte[] abyte0)
throws SQLException
setBytes in interface BlobSQLException - always, set methods are not relevant in cached state.
public int setBytes(long l,
byte[] abyte0,
int i,
int j)
throws SQLException
setBytes in interface BlobSQLException - always, set methods are not relevant in cached state.
public OutputStream setBinaryStream(long pos)
throws SQLException
setBinaryStream in interface BlobsetBinaryStream in interface FirebirdBlobpos - the position in the BLOB value at which
to start writing; currently only position 0 is supported.
java.io.OutputStream object to which data can
be written
SQLException - always, set methods are not relevant in cached state.
public void truncate(long length)
throws SQLException
truncate in interface BlobSQLException - always, truncate is not relevant in cached state.
public Object getSynchronizationObject()
throws SQLException
Synchronizable
getSynchronizationObject in interface Synchronizablenull.
SQLException - if something went wrong.
public void free()
throws SQLException
free in interface BlobSQLException
public InputStream getBinaryStream(long pos,
long length)
throws SQLException
getBinaryStream in interface BlobSQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||