Class V10OutputBlob
java.lang.Object
org.firebirdsql.gds.ng.AbstractFbBlob
org.firebirdsql.gds.ng.wire.AbstractFbWireBlob
org.firebirdsql.gds.ng.wire.AbstractFbWireOutputBlob
org.firebirdsql.gds.ng.wire.version10.V10OutputBlob
- All Implemented Interfaces:
AutoCloseable,FbBlob,DatabaseListener,ExceptionListenable,TransactionListener,FbWireBlob
- Since:
- 3.0
- Author:
- Mark Rotteveel
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.firebirdsql.gds.ng.FbBlob
FbBlob.SeekMode -
Field Summary
Fields inherited from class org.firebirdsql.gds.ng.AbstractFbBlob
exceptionListenerDispatcherFields inherited from interface org.firebirdsql.gds.ng.FbBlob
NO_BLOB_ID -
Constructor Summary
ConstructorsConstructorDescriptionV10OutputBlob(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer) -
Method Summary
Modifier and TypeMethodDescriptionvoidopen()Opens an existing input blob, or creates an output blob.voidputSegment(byte[] segment) Writes a segment of blob data.Methods inherited from class org.firebirdsql.gds.ng.wire.AbstractFbWireOutputBlob
getBlobId, getSegment, isOutput, seek, setBlobIdMethods inherited from class org.firebirdsql.gds.ng.wire.AbstractFbWireBlob
cancelImpl, closeImpl, getBlobInfo, getDatabase, getHandle, releaseBlob, releaseResources, setHandleMethods inherited from class org.firebirdsql.gds.ng.AbstractFbBlob
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, warningReceivedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.firebirdsql.gds.ng.listeners.DatabaseListener
detached, detaching, warningReceivedMethods inherited from interface org.firebirdsql.gds.ng.listeners.ExceptionListenable
addExceptionListener, removeExceptionListenerMethods inherited from interface org.firebirdsql.gds.ng.FbBlob
cancel, close, getBlobId, getBlobInfo, getBlobInfo, getDatabase, getHandle, getMaximumSegmentSize, getSegment, getSynchronizationObject, isEof, isOpen, isOutput, length, seek
-
Constructor Details
-
V10OutputBlob
public V10OutputBlob(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer)
-
-
Method Details
-
open
Description copied from interface:FbBlobOpens an existing input blob, or creates an output blob.- Specified by:
openin interfaceFbBlob- Throws:
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 occurred
-
putSegment
Description copied from interface:FbBlobWrites a segment of blob data.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.- Specified by:
putSegmentin interfaceFbBlob- Parameters:
segment- Segment to write- Throws:
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.
-