public class ClobLocatorOutputStream extends OutputStream
OutputStream that will use an locator to write
bytes to the Clob value on the server.
Closing a ByteArrayInputStream 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 efficieny #write(byte[])
should be used instead of #write(int).
| Constructor and Description |
|---|
ClobLocatorOutputStream(Connection connection,
Clob clob,
long pos)
Create an
OutputStream for writing to the
Clob value represented by the given locator based
Clob object. |
public ClobLocatorOutputStream(Connection connection, Clob clob, long pos) throws SqlException
OutputStream for writing to the
Clob value represented by the given locator based
Clob object.connection - connection to be used to write to the
Clob value on the serverclob - Clob object that contains locator for
the Clob value on the server.pos - the position in the CLOB value at which
to start writing; the first position is 1SqlExceptionpublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionThis method writes one byte at a time to the server. For more
efficient writing, use #write(byte[]).public void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionOutputStream.write(byte[])public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionOutputStream.write(byte[], int, int)public void flush()
flush in interface Flushableflush in class OutputStreamOutputStream.flush()Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.