Package org.firebirdsql.gds.ng.wire
Class AbstractFbWireOutputBlob
- java.lang.Object
- 
- org.firebirdsql.gds.ng.AbstractFbBlob
- 
- org.firebirdsql.gds.ng.wire.AbstractFbWireBlob
- 
- org.firebirdsql.gds.ng.wire.AbstractFbWireOutputBlob
 
 
 
- 
- All Implemented Interfaces:
- java.lang.AutoCloseable,- FbBlob,- DatabaseListener,- ExceptionListenable,- TransactionListener,- FbWireBlob
 - Direct Known Subclasses:
- V10OutputBlob
 
 public abstract class AbstractFbWireOutputBlob extends AbstractFbWireBlob - Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.firebirdsql.gds.ng.FbBlobFbBlob.SeekMode
 
- 
 - 
Field Summary- 
Fields inherited from class org.firebirdsql.gds.ng.AbstractFbBlobexceptionListenerDispatcher
 - 
Fields inherited from interface org.firebirdsql.gds.ng.FbBlobNO_BLOB_ID
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractFbWireOutputBlob(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetBlobId()byte[]getSegment(int sizeRequested)Gets a segment of blob data.booleanisOutput()voidseek(int offset, FbBlob.SeekMode seekMode)Performs a seek on a blob with the specifiedseekModeandoffset.protected voidsetBlobId(long blobId)Sets the blob id.- 
Methods inherited from class org.firebirdsql.gds.ng.wire.AbstractFbWireBlobcancelImpl, closeImpl, getBlobInfo, getDatabase, getHandle, releaseBlob, releaseResources, setHandle
 - 
Methods inherited from class org.firebirdsql.gds.ng.AbstractFbBlobaddExceptionListener, 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
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.firebirdsql.gds.ng.listeners.ExceptionListenableaddExceptionListener, removeExceptionListener
 - 
Methods inherited from interface org.firebirdsql.gds.ng.FbBlobcancel, close, getBlobInfo, getMaximumSegmentSize, getSynchronizationObject, isEof, isOpen, length, open, putSegment
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractFbWireOutputBlobprotected AbstractFbWireOutputBlob(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer) 
 
- 
 - 
Method Detail- 
getBlobIdpublic final long getBlobId() - Returns:
- The Firebird blob id
 
 - 
setBlobIdprotected final void setBlobId(long blobId) throws java.sql.SQLExceptionSets the blob id.- Parameters:
- blobId- Blob id.
- Throws:
- java.sql.SQLException- If this is an input blob, or if this is an output blob whose blobId was already set.
 
 - 
isOutputpublic final boolean isOutput() - Returns:
- trueif this is an output blob (write only),- falseif this is an input blob (read only)
 
 - 
getSegmentpublic final byte[] getSegment(int sizeRequested) throws java.sql.SQLExceptionDescription copied from interface:FbBlobGets a segment of blob data.When TODO: Consider allowing this and have the implementation handle longer segments by sending multiple (batched?) requests.sizeRequestedexceedsFbBlob.getMaximumSegmentSize()it is silently reduced to the maximum segment size.- Parameters:
- sizeRequested- Requested segment size (> 0).
- Returns:
- Retrieved segment (size may be less than requested)
- Throws:
- java.sql.SQLException- If this is an output blob, the blob is closed, the transaction is not active, or a database connection error occurred.
 
 - 
seekpublic final void seek(int offset, FbBlob.SeekMode seekMode) throws java.sql.SQLExceptionDescription copied from interface:FbBlobPerforms a seek on a blob with the specifiedseekModeandoffset.Firebird only supports seek on stream blobs. - Parameters:
- offset- Offset of the seek, effect depends on value of- seekMode
- seekMode- Value of- FbBlob.SeekMode
- Throws:
- java.sql.SQLException- If the blob is closed, the transaction is not active, or a database error occurred.
 
 
- 
 
-