| Modifier and Type | Field and Description |
|---|---|
| pack-priv InputStream | |
| pack-priv byte[] | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| public | |
| pack-priv | |
| pack-priv | ClientBlob(Agent agent, InputStream
the stream to get data from binaryStream)Create a new Important Note This constructor is a temporary solution for implementing lengthless overloads in the JDBC4 API. |
| public | ClientBlob(Agent
context for this Blob object (incl. connection) agent, int reference id to Blob value on server locator)Create a |
| Modifier and Type | Method and Description |
|---|---|
| private long | |
| 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 | Returns: InputStream through which the partial
Blob value can be read.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.
|
| pack-priv InputStream | |
| public byte[] | Returns: a byte array containing up tolength
consecutive bytes from the BLOB value designated
by this Blob object, starting with the
byte at position startPos.the ordinal position of the first byte in the
pos, int BLOB value to be extracted; the first byte is at
position 1is the number of consecutive bytes to be copied length)Implements java. BLOB
value that this Blob object designates.
|
| private byte[] | |
| pack-priv long | Returns: length of Blob in bytesOverrides org. Blob value represented by
this locator based <blob> object.
|
| public boolean | |
| public boolean | |
| private boolean | |
| public long | length()
Implements abstract org. Implements java. BLOB value
designated by this Blob object.
|
| protected void | materializeStream()
Implements abstract org. |
| 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.
|
| private long | |
| private long | |
| 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.
|
| pack-priv int | |
| 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 |
|---|---|
| pack-priv InputStream binaryStream_ | |
| binaryString_ | back to summary |
|---|---|
| pack-priv byte[] binaryString_ | |
| dataOffset_ | back to summary |
|---|---|
| pack-priv int dataOffset_ | |
| ClientBlob | back to summary |
|---|---|
| public ClientBlob(byte[] binaryString, Agent agent, int dataOffset) | |
| ClientBlob | back to summary |
|---|---|
| pack-priv ClientBlob(Agent agent, InputStream binaryStream, int length) | |
| ClientBlob | back to summary |
|---|---|
| pack-priv ClientBlob(Agent agent, InputStream binaryStream) Create a new Important Note This constructor is a temporary solution for
implementing lengthless overloads in the JDBC4 API. Before a proper
solution can be implemented, we need to enable streaming without having
to know the stream length in the DRDA protocol. See Jira DERBY-1471 and
DERBY-1417 for more details.
Shortcomings: This constructor will cause the whole stream
to be materialized to determine its length. If the stream is big
enough, the client will fail with an OutOfMemoryError. Since this is a
temporary solution, state checking is not added to all methods as it
would clutter up the class severely. After using the constructor, the
| |
| ClientBlob | back to summary |
|---|---|
| public ClientBlob(Agent agent, int locator) Create a
| |
| binaryStringPosition | back to summary |
|---|---|
| private long binaryStringPosition(byte[] pattern, long start) | |
| free | back to summary |
|---|---|
| public void free() throws SQLException Implements java. This method frees the
| |
| 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. Returns an
| |
| getBinaryStreamX | back to summary |
|---|---|
| pack-priv InputStream getBinaryStreamX() throws SqlException | |
| getBytes | back to summary |
|---|---|
| public byte[] getBytes(long pos, int length) throws SQLException Implements java. Returns as an array of bytes part or all of the
| |
| getBytesX | back to summary |
|---|---|
| private byte[] getBytesX(long pos, int length) throws SqlException | |
| getLocatorLength | back to summary |
|---|---|
| pack-priv long getLocatorLength() throws SqlException Overrides org. Get the length in bytes of the length of Blob in bytes
| |
| isBinaryStream | back to summary |
|---|---|
| public boolean isBinaryStream() | |
| isBinaryString | back to summary |
|---|---|
| public boolean isBinaryString() | |
| isSubString | back to summary |
|---|---|
| private boolean isSubString(byte[] pattern, int index) | |
| length | back to summary |
|---|---|
| public long length() throws SQLException Implements abstract org. Implements java. Doc from java. Returns the number of bytes in the
| |
| materializeStream | back to summary |
|---|---|
| protected void materializeStream() throws SqlException Implements abstract org. Materialize the stream used for input to the database.
| |
| 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
| |
| positionX | back to summary |
|---|---|
| private long positionX(byte[] pattern, long start) throws SqlException | |
| positionX | back to summary |
|---|---|
| private long positionX(Blob pattern, long start) throws SqlException | |
| 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
| |
| setBytesX | back to summary |
|---|---|
| pack-priv int setBytesX(long pos, byte[] bytes, int offset, int len) throws SqlException | |
| truncate | back to summary |
|---|---|
| public void truncate(long len) throws SQLException Implements java. Doc from java. Truncates the Note If the value specified for
| |