Package org.apache.derby.impl.jdbc
Class ClobUtf8Writer
java.lang.Object
java.io.Writer
org.apache.derby.impl.jdbc.ClobUtf8Writer
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
Writer implementation for
Clob
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
control
-
pos
private long pos -
closed
private boolean closed
-
-
Constructor Details
-
ClobUtf8Writer
ClobUtf8Writer(TemporaryClob control, long pos) Constructor.- Parameters:
control
- worker object for the CLOB valuepos
- initial byte position in the CLOB value
-
-
Method Details
-
flush
Flushes the stream.Flushing the stream after
close()
has been called will cause an exception to be thrown.Implementation note: In the current implementation, this is a no-op. Flushing is left to the underlying stream(s). Note that when programming against/with this class, always follow good practice and call
flush
.- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
- if the stream has been closed
-
close
public void close()Closes the stream.Once the stream has been closed, further
write
orflush()
invocations will cause anIOException
to be thrown. Closing a previously closed stream has no effect. -
write
Writes a portion of an array of characters to the CLOB value.- Specified by:
write
in classWriter
- Parameters:
cbuf
- array of charactersoff
- offset intocbuf
from which to start writing characterslen
- number of characters to write- Throws:
IOException
- if an I/O error occurs
-