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, 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, getSegment, getSynchronizationObject, isEof, isOpen, isOutput, length, seek
addExceptionListener, removeExceptionListener
detached, detaching, warningReceived
public V10OutputBlob(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer)
public void open() throws java.sql.SQLException
FbBlob
public void putSegment(byte[] segment) throws java.sql.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 writejava.sql.SQLException
- 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-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.