public class V10InputBlob extends AbstractFbWireInputBlob implements FbWireBlob, DatabaseListener
FbBlob.SeekMode
exceptionListenerDispatcher
NO_BLOB_ID
Constructor and Description |
---|
V10InputBlob(FbWireDatabase database,
FbWireTransaction transaction,
BlobParameterBuffer blobParameterBuffer,
long blobId) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getSegment(int sizeRequested)
Gets a segment of blob data.
|
void |
open()
Opens an existing input blob, or creates an output blob.
|
void |
seek(int offset,
FbBlob.SeekMode seekMode)
Performs a seek on a blob with the specified
seekMode and offset . |
getBlobId, isOutput, putSegment
cancelImpl, closeImpl, getBlobInfo, getDatabase, getHandle, releaseBlob, releaseResources, setHandle
addExceptionListener, cancel, checkBlobClosed, checkBlobOpen, checkDatabaseAttached, checkTransactionActive, clearDatabase, clearTransaction, close, createBlobLengthProcessor, detached, detaching, getBlobInfo, getBlobParameterBuffer, getMaximumSegmentSize, getSynchronizationObject, getTransaction, isEndingTransaction, isEof, isOpen, length, removeExceptionListener, resetEof, setEof, setOpen, transactionStateChanged, warningReceived
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cancel, close, getBlobId, getBlobInfo, getBlobInfo, getDatabase, getHandle, getMaximumSegmentSize, getSynchronizationObject, isEof, isOpen, isOutput, length, putSegment
addExceptionListener, removeExceptionListener
detached, detaching, warningReceived
public V10InputBlob(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer, long blobId)
public void open() throws java.sql.SQLException
FbBlob
public byte[] getSegment(int sizeRequested) throws java.sql.SQLException
FbBlob
When sizeRequested
exceeds FbBlob.getMaximumSegmentSize()
it is silently reduced to the maximum
segment size.
getSegment
in interface FbBlob
sizeRequested
- Requested segment size (> 0).java.sql.SQLException
- If this is an output blob, the blob is closed, the transaction is not active, or a database connection
error occurred.public void seek(int offset, FbBlob.SeekMode seekMode) throws java.sql.SQLException
FbBlob
seekMode
and offset
.
Firebird only supports seek on stream blobs.
seek
in interface FbBlob
offset
- Offset of the seek, effect depends on value of seekMode
seekMode
- Value of FbBlob.SeekMode
java.sql.SQLException
- If the blob is closed, the transaction is not active, or a database error occurred.Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.