- All Superinterfaces:
Blob
- All Known Implementing Classes:
FBBlob
,FBCachedBlob
Firebird Blob abstraction. This interface defines methods to read and write
Blob content.
- Author:
- Roman Rokytskyy
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Blob input stream.static interface
Blob output stream. -
Method Summary
Methods inherited from interface java.sql.Blob
free, getBinaryStream, getBinaryStream, getBytes, length, position, position, setBinaryStream, setBytes, setBytes, truncate
-
Method Details
-
detach
Detach this blob. This method creates new instance of the same blob database object that is not under result set control. When result set is closed, all associated resources are also released, including open blob streams. This method creates a new instance of blob object with the same blob ID that can be used even when result set is closed.Note, detached blob will not remember the stream position of this object. This means that you cannot start reading data from the blob, then detach it, and then continue reading. Reading from detached blob will begin at the blob start.
- Returns:
- instance of
FirebirdBlob
that is not under result set control. - Throws:
SQLException
- if Blob cannot be detached.
-
isSegmented
Check if blob is segmented. If Blob is segmented, you cannot useFirebirdBlob.BlobInputStream.seek(int)
method.- Returns:
true
if this blob is segmented, otherwisefalse
- Throws:
SQLException
-
getBytes
Gets the byte content of this blob as a byte array.- Returns:
- byte array with blob content (may return
null
for certain cached blobs) - Throws:
SQLException
- for database access errors, or if the blob size exceeds the maximum safe array size (i.e.Integer.MAX_VALUE
- 8)- Since:
- 6
-