OutputStream that will use an locator to write
bytes to the Blob value on the server.
Closing a BlobLocatorOutputStream has no effect. The
methods in this class can be called after the stream has been
closed without generating an IOException.
This OutputStream implementation is pretty basic. No
buffering of data is done. Hence, for efficiency #write(byte[])
should be used instead of #write(int).
| Modifier and Type | Field and Description |
|---|---|
| private final ClientBlob | blob
The Blob to be accessed. |
| private final ClientConnection | connection
Connection used to read Blob from server. |
| private long | currentPos
Current position in the underlying Blob. |
| Access | Constructor and Description |
|---|---|
| pack-priv | BlobLocatorOutputStream(ClientConnection
connection to be used to write to the
connection, ClientBlob Blob value on the serverBlob object that contains locator for
the Blob value on the server.the position in the pos)BLOB value at which
to start writing; the first position is 1Create an |
| Modifier and Type | Method and Description |
|---|---|
| public void | write(int
the b)byte.Implements abstract java. |
| public void | write(byte[]
the data. b)Overrides java. b.length bytes from the specified byte array
to this output stream.
|
| public void | write(byte[]
the data. b, int the start offset in the data. off, int the number of bytes to write. len)Overrides java. len bytes from the specified byte array
starting at offset off to this output stream.
|
| private void | writeBytes(byte[]
The byte array containing the bytes to be written b)Write the |
| blob | back to summary |
|---|---|
| private final ClientBlob blob The Blob to be accessed. | |
| connection | back to summary |
|---|---|
| private final ClientConnection connection Connection used to read Blob from server. | |
| currentPos | back to summary |
|---|---|
| private long currentPos Current position in the underlying Blob. Blobs are indexed from 1 | |
| BlobLocatorOutputStream | back to summary |
|---|---|
| pack-priv BlobLocatorOutputStream(ClientConnection connection, ClientBlob blob, long pos) throws SqlException Create an
| |
| write | back to summary |
|---|---|
| public void write(int b) throws IOException Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |
| write | back to summary |
|---|---|
| public void write(byte[] b) throws IOException Overrides java. Doc from java. Writes
| |
| write | back to summary |
|---|---|
| public void write(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Writes
If
If
| |
| writeBytes | back to summary |
|---|---|
| private void writeBytes(byte[] b) throws IOException Write the
| |