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 class org.firebirdsql.gds.ng.wire.AbstractFbWireBlob
AbstractFbWireBlob.BlobOpenOperation
Nested classes/interfaces inherited from interface org.firebirdsql.gds.ng.FbBlob
FbBlob.SeekMode
-
Field Summary
Fields inherited from class org.firebirdsql.gds.ng.AbstractFbBlob
exceptionListenerDispatcher
Fields inherited from interface org.firebirdsql.gds.ng.FbBlob
NO_BLOB_ID
-
Constructor Summary
ConstructorsConstructorDescriptionV10OutputBlob
(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
consumePutSegmentResponses
(int requestCount) void
open()
Opens an existing input blob, or creates an output blob.void
put
(byte[] b, int off, int len) Writes content ofb
starting atoff
forlength
bytes to the blob.Methods inherited from class org.firebirdsql.gds.ng.wire.AbstractFbWireOutputBlob
get, getBlobId, getSegment, isOutput, seek, setBlobId
Methods inherited from class org.firebirdsql.gds.ng.wire.AbstractFbWireBlob
cancelImpl, closeImpl, getBlobInfo, getDatabase, getHandle, getXdrIn, getXdrOut, releaseBlob, releaseResources, sendOpen, setHandle
Methods inherited from class org.firebirdsql.gds.ng.AbstractFbBlob
addExceptionListener, cancel, checkBlobClosed, checkBlobOpen, checkDatabaseAttached, checkTransactionActive, clearDatabase, clearTransaction, close, createBlobLengthProcessor, detached, detaching, get, get, getBlobInfo, getBlobParameterBuffer, getMaximumSegmentSize, getTransaction, isEndingTransaction, isEof, isOpen, length, putSegment, removeExceptionListener, resetEof, setEof, setOpen, transactionStateChanged, validateBufferLength, warningReceived, withLock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.firebirdsql.gds.ng.listeners.DatabaseListener
detached, detaching, warningReceived
Methods inherited from interface org.firebirdsql.gds.ng.listeners.ExceptionListenable
addExceptionListener, removeExceptionListener
Methods inherited from interface org.firebirdsql.gds.ng.FbBlob
cancel, close, get, get, getBlobId, getBlobInfo, getBlobInfo, getDatabase, getHandle, getMaximumSegmentSize, getSegment, isEof, isOpen, isOutput, length, putSegment, seek
-
Constructor Details
-
V10OutputBlob
public V10OutputBlob(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer)
-
-
Method Details
-
open
Description copied from interface:FbBlob
Opens an existing input blob, or creates an output blob.- Specified by:
open
in 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
-
put
Description copied from interface:FbBlob
Writes content ofb
starting atoff
forlength
bytes to the blob.Implementations must write all bytes to the blob, using multiple round-trips if necessary.
If the implementation cannot perform writes without additional allocation, it should use at most
DatabaseConnectionProperties.getBlobBufferSize()
as an internal buffer. If the implementation can perform writes without additional allocation, it is recommended it performs reads using (at most)FbBlob.getMaximumSegmentSize()
.- Specified by:
put
in interfaceFbBlob
- Parameters:
b
- source byte arrayoff
- offset to startlen
- number of bytes- Throws:
SQLException
- for database access errors, ifoff < 0
,len < 0
, or ifoff + len > b.length
-
consumePutSegmentResponses
- Throws:
SQLException
-