Blob adapter that exposes a given byte array or binary stream.
Optionally used by DefaultLobHandler.
| Modifier and Type | Field and Description |
|---|---|
| private InputStream | |
| private byte[] | |
| private final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | free()
Implements java. Blob object and releases the resources that
it holds.
|
| public InputStream | getBinaryStream()
Implements java. BLOB value designated by this
Blob instance as a stream.
|
| public InputStream | getBinaryStream(long
the offset to the first byte of the partial value to be
retrieved. The first byte in the pos, long Blob is at position 1.the length in bytes of the partial value to be retrieved length)Implements java. InputStream object that contains
a partial Blob value, starting with the byte
specified by pos, which is length bytes in length.
|
| public byte[] | getBytes(long
the ordinal position of the first byte in the
pos, int BLOB value to be extracted; the first byte is at
position 1the number of consecutive bytes to be copied; the value
for length must be 0 or greater length)Implements java. BLOB
value that this Blob object represents, as an array of
bytes.
|
| public long | length()
Implements java. BLOB value
designated by this Blob object.
|
| public long | position(byte[]
the byte array for which to search pattern, long the position at which to begin searching; the
first position is 1 start)Implements java. pattern begins within the BLOB
value that this Blob object represents.
|
| public long | position(Blob
the pattern, long Blob object designating
the BLOB value for which to searchthe position in the start)BLOB value
at which to begin searching; the first position is 1Implements java. BLOB value
designated by this Blob object at which
pattern begins.
|
| public OutputStream | setBinaryStream(long
the position in the pos)BLOB value at which
to start writing; the first position is 1Implements java. BLOB
value that this Blob object represents.
|
| public int | setBytes(long
the position in the pos, byte[] BLOB object at which
to start writing; the first position is 1the array of bytes to be written to the bytes)BLOB
value that this Blob object representsImplements java. BLOB value that
this Blob object represents, starting at position
pos, and returns the number of bytes written.
|
| public int | setBytes(long
the position in the pos, byte[] BLOB object at which
to start writing; the first position is 1the array of bytes to be written to this bytes, int BLOB
objectthe offset into the array offset, int bytes at which
to start reading the bytes to be setthe number of bytes to be written to the len)BLOB
value from the array of bytes bytesImplements java. byte array to the
BLOB value that this Blob object represents
and returns the number of bytes written.
|
| public void | truncate(long
the length, in bytes, to which the len)BLOB value
that this Blob object represents should be truncatedImplements java. BLOB value that this Blob
object represents to be len bytes in length.
|
| binaryStream | back to summary |
|---|---|
| private InputStream binaryStream
| |
| content | back to summary |
|---|---|
| private byte[] content
| |
| contentLength | back to summary |
|---|---|
| private final long contentLength | |
| PassThroughBlob | back to summary |
|---|---|
| public PassThroughBlob(byte[] content) | |
| PassThroughBlob | back to summary |
|---|---|
| public PassThroughBlob(InputStream binaryStream, long contentLength) | |
| free | back to summary |
|---|---|
| public void free() throws SQLException Implements java. Doc from java. This method frees the
After
| |
| getBinaryStream | back to summary |
|---|---|
| public InputStream getBinaryStream() throws SQLException Implements java. Doc from java. Retrieves the
| |
| getBinaryStream | back to summary |
|---|---|
| public InputStream getBinaryStream(long pos, long length) throws SQLException Implements java. Doc from java. Returns an
| |
| getBytes | back to summary |
|---|---|
| public byte[] getBytes(long pos, int length) throws SQLException Implements java. Doc from java. Retrieves all or part of the
| |
| length | back to summary |
|---|---|
| public long length() throws SQLException Implements java. Doc from java. Returns the number of bytes in the
| |
| position | back to summary |
|---|---|
| public long position(byte[] pattern, long start) throws SQLException Implements java. Doc from java. Retrieves the byte position at which the specified byte array
| |
| position | back to summary |
|---|---|
| public long position(Blob pattern, long start) throws SQLException Implements java. Doc from java. Retrieves the byte position in the
| |
| setBinaryStream | back to summary |
|---|---|
| public OutputStream setBinaryStream(long pos) throws SQLException Implements java. Doc from java. Retrieves a stream that can be used to write to the Note If the value specified for
| |
| setBytes | back to summary |
|---|---|
| public int setBytes(long pos, byte[] bytes) throws SQLException Implements java. Doc from java. Writes the given array of bytes to the Note If the value specified for
| |
| setBytes | back to summary |
|---|---|
| public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException Implements java. Doc from java. Writes all or part of the given Note If the value specified for
| |
| truncate | back to summary |
|---|---|
| public void truncate(long len) throws SQLException Implements java. Doc from java. Truncates the Note If the value specified for
| |