java.lang.Object
org.firebirdsql.gds.ng.AbstractFbBlob
org.firebirdsql.gds.ng.jna.JnaBlob
- All Implemented Interfaces:
AutoCloseable,org.firebirdsql.gds.ng.FbBlob,org.firebirdsql.gds.ng.listeners.DatabaseListener,org.firebirdsql.gds.ng.listeners.ExceptionListenable,org.firebirdsql.gds.ng.listeners.TransactionListener
public class JnaBlob
extends org.firebirdsql.gds.ng.AbstractFbBlob
implements org.firebirdsql.gds.ng.FbBlob, org.firebirdsql.gds.ng.listeners.DatabaseListener
Implementation of
FbBlob for native client access.- Since:
- 3.0
- Author:
- Mark Rotteveel
-
Nested Class Summary
Nested classes/interfaces inherited from class org.firebirdsql.gds.ng.AbstractFbBlob
org.firebirdsql.gds.ng.AbstractFbBlob.BlobStateNested classes/interfaces inherited from interface org.firebirdsql.gds.ng.FbBlob
org.firebirdsql.gds.ng.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
ConstructorsConstructorDescriptionJnaBlob(JnaDatabase database, JnaTransaction transaction, org.firebirdsql.gds.BlobParameterBuffer blobParameterBuffer) Creates a blob for output (writing to the database).JnaBlob(JnaDatabase database, JnaTransaction transaction, org.firebirdsql.gds.BlobParameterBuffer blobParameterBuffer, long blobId) Creates a blob for input (reading from the database). -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected intget(byte[] b, int off, int len, int minLen) final longbyte[]getBlobInfo(byte[] requestItems, int bufferLength) intfinal com.sun.jna.ptr.IntByReferencebyte[]getSegment(int sizeRequested) final booleanisOutput()voidopen()voidput(byte[] b, int off, int len) protected voidvoidseek(int offset, org.firebirdsql.gds.ng.FbBlob.SeekMode seekMode) Methods inherited from class org.firebirdsql.gds.ng.AbstractFbBlob
addExceptionListener, cancel, checkBlobClosed, checkBlobOpen, checkDatabaseAttached, checkTransactionActive, clearDatabase, clearDeferredException, clearTransaction, close, createBlobLengthProcessor, detached, detaching, errorOccurred, get, get, getBlobInfo, getBlobParameterBuffer, getKnownBlobInfoItems, getMaximumSegmentSize, getState, isEndingTransaction, isEof, isOpen, length, putSegment, registerDeferredException, removeExceptionListener, resetEof, setEof, setState, throwAndClearDeferredException, transactionStateChanged, transferDeferredExceptionTo, validateBufferLength, warningReceived, withLockMethods 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, get, get, getBlobInfo, getMaximumSegmentSize, isEof, isOpen, length, putSegment
-
Constructor Details
-
JnaBlob
public JnaBlob(JnaDatabase database, JnaTransaction transaction, org.firebirdsql.gds.BlobParameterBuffer blobParameterBuffer) throws SQLException Creates a blob for output (writing to the database).- Parameters:
database- databasetransaction- transactionblobParameterBuffer- blob parameter buffer- Throws:
SQLException
-
JnaBlob
public JnaBlob(JnaDatabase database, JnaTransaction transaction, org.firebirdsql.gds.BlobParameterBuffer blobParameterBuffer, long blobId) throws SQLException Creates a blob for input (reading from the database).- Parameters:
database- databasetransaction- transactionblobParameterBuffer- blob parameter bufferblobId- blob id- Throws:
SQLException
-
-
Method Details
-
getDatabase
- Specified by:
getDatabasein interfaceorg.firebirdsql.gds.ng.FbBlob- Overrides:
getDatabasein classorg.firebirdsql.gds.ng.AbstractFbBlob
-
getTransaction
- Overrides:
getTransactionin classorg.firebirdsql.gds.ng.AbstractFbBlob
-
getHandle
public int getHandle()- Specified by:
getHandlein interfaceorg.firebirdsql.gds.ng.FbBlob
-
getJnaHandle
public final com.sun.jna.ptr.IntByReference getJnaHandle() -
getBlobId
public final long getBlobId()- Specified by:
getBlobIdin interfaceorg.firebirdsql.gds.ng.FbBlob
-
open
- Specified by:
openin interfaceorg.firebirdsql.gds.ng.FbBlob- Throws:
SQLException
-
isOutput
public final boolean isOutput()- Specified by:
isOutputin interfaceorg.firebirdsql.gds.ng.FbBlob
-
getSegment
- Specified by:
getSegmentin interfaceorg.firebirdsql.gds.ng.FbBlob- Throws:
SQLException
-
get
- Specified by:
getin classorg.firebirdsql.gds.ng.AbstractFbBlob- Throws:
SQLException
-
put
- Specified by:
putin interfaceorg.firebirdsql.gds.ng.FbBlob- Throws:
SQLException
-
seek
- Specified by:
seekin interfaceorg.firebirdsql.gds.ng.FbBlob- Throws:
SQLException
-
getBlobInfo
- Specified by:
getBlobInfoin interfaceorg.firebirdsql.gds.ng.FbBlob- Throws:
SQLException
-
closeImpl
- Specified by:
closeImplin classorg.firebirdsql.gds.ng.AbstractFbBlob- Throws:
SQLException
-
cancelImpl
- Specified by:
cancelImplin classorg.firebirdsql.gds.ng.AbstractFbBlob- Throws:
SQLException
-
releaseResources
protected void releaseResources()- Specified by:
releaseResourcesin classorg.firebirdsql.gds.ng.AbstractFbBlob
-