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. This method frees the |
| public InputStream | getBinaryStream()
Implements java. Retrieves the |
| 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. Returns an |
| 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. Retrieves all or part of the |
| public long | length()
Implements java. Returns the number of bytes in the |
| 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. Retrieves the byte position at which the specified byte array
|
| 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. Retrieves the byte position in the |
| public OutputStream | setBinaryStream(long
the position in the pos)BLOB value at which
to start writing; the first position is 1Implements java. Retrieves a stream that can be used to write to the |
| 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. Writes the given array of bytes to the |
| 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. Writes all or part of the given |
| public void | truncate(long
the length, in bytes, to which the len)BLOB value
that this Blob object represents should be truncatedImplements java. Truncates the |
| 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
| |