public class V10OutputBlob extends AbstractFbWireOutputBlob implements FbWireBlob, DatabaseListener
FbBlob.SeekMode
exceptionListenerDispatcher
NO_BLOB_ID
Constructor and Description |
---|
V10OutputBlob(FbWireDatabase database,
FbWireTransaction transaction,
BlobParameterBuffer blobParameterBuffer) |
Modifier and Type | Method and Description |
---|---|
void |
open()
Opens an existing input blob, or creates an output blob.
|
void |
putSegment(byte[] segment)
Writes a segment of blob data.
|
getBlobId, getSegment, isOutput, seek, setBlobId
cancelImpl, closeImpl, getBlobInfo, getDatabase, getHandle, releaseBlob, setHandle
addExceptionListener, cancel, checkBlobClosed, checkBlobOpen, checkDatabaseAttached, checkTransactionActive, clearDatabase, clearTransaction, close, createBlobLengthProcessor, detached, detaching, getBlobInfo, getBlobParameterBuffer, getMaximumSegmentSize, getSynchronizationObject, getTransaction, 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, getSegment, getSynchronizationObject, isEof, isOpen, isOutput, length, seek
addExceptionListener, removeExceptionListener
detached, detaching, warningReceived
public V10OutputBlob(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer)
public void open() throws SQLException
FbBlob
open
in interface FbBlob
SQLException
- If the blob is already open, this is a (closed) output blob and it already has a blobId, the
transaction is not active, or a database connection error occurredpublic void putSegment(byte[] segment) throws SQLException
FbBlob
Implementation must handle segment length exceeding FbBlob.getMaximumSegmentSize()
by batching. TODO: reconsider and let caller handle that?
Passing a section that is length 0 will throw an SQLException
.
putSegment
in interface FbBlob
segment
- Segment to writeSQLException
- If this is an input blob, the blob is closed, the transaction is not active, the segment is length 0 or
longer than the maximum segment size, or a database connection error occurred.Copyright © 2001-2015 Jaybird (Firebird JDBC/JCA) team. All rights reserved.