Blob (Java SE 26 & JDK 26)
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
SerialBlob
-
Method Summary
default voidclose()Closes and releases the resources held by this
Blobobject.voidfree()Closes and releases the resources held by this
Blobobject.Retrieves the
BLOBvalue designated by thisBlobinstance as a stream.getBinaryStream(long pos, long length) Returns an
InputStreamobject that contains a partialBlobvalue, starting with the byte specified by pos, which is length bytes in length.byte[]getBytes(long pos, int length) Retrieves all or part of the
BLOBvalue that thisBlobobject represents, as an array of bytes.longlength()Returns the number of bytes in the
BLOBvalue designated by thisBlobobject.longposition(byte[] pattern, long start) Retrieves the byte position at which the specified byte array
patternbegins within theBLOBvalue that thisBlobobject represents.longposition(Blob pattern, long start) Retrieves the byte position in the
BLOBvalue designated by thisBlobobject at whichpatternbegins.setBinaryStream(long pos) Retrieves a stream that can be used to write to the
BLOBvalue that thisBlobobject represents.intsetBytes(long pos, byte[] bytes) Writes the given array of bytes to the
BLOBvalue that thisBlobobject represents, starting at positionpos, and returns the number of bytes written.intsetBytes(long pos, byte[] bytes, int offset, int len) Writes all or part of the given
bytearray to theBLOBvalue that thisBlobobject represents and returns the number of bytes written.voidtruncate(long len) Truncates the
BLOBvalue that thisBlobobject represents to belenbytes in length.
-
Method Details
-
length
-
getBytes
-
getBinaryStream
-
position
-
position
-
setBytes
-
setBytes
-
setBinaryStream
-
truncate
-
free
-
getBinaryStream
-
close
-