Package org.apache.derby.impl.jdbc
Class ClobUtf8Writer
- java.lang.Object
-
- java.io.Writer
-
- org.apache.derby.impl.jdbc.ClobUtf8Writer
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.AutoCloseable
final class ClobUtf8Writer extends java.io.WriterWriter implementation forClob.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanclosedprivate TemporaryClobcontrolprivate longpos
-
Constructor Summary
Constructors Constructor Description ClobUtf8Writer(TemporaryClob control, long pos)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the stream.voidflush()Flushes the stream.voidwrite(char[] cbuf, int off, int len)Writes a portion of an array of characters to the CLOB value.
-
-
-
Field Detail
-
control
private TemporaryClob control
-
pos
private long pos
-
closed
private boolean closed
-
-
Constructor Detail
-
ClobUtf8Writer
ClobUtf8Writer(TemporaryClob control, long pos)
Constructor.- Parameters:
control- worker object for the CLOB valuepos- initial byte position in the CLOB value
-
-
Method Detail
-
flush
public void flush() throws java.io.IOExceptionFlushes 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:
flushin interfacejava.io.Flushable- Specified by:
flushin classjava.io.Writer- Throws:
java.io.IOException- if the stream has been closed
-
close
public void close()
Closes the stream.Once the stream has been closed, further
writeorflush()invocations will cause anIOExceptionto be thrown. Closing a previously closed stream has no effect.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classjava.io.Writer
-
write
public void write(char[] cbuf, int off, int len) throws java.io.IOExceptionWrites a portion of an array of characters to the CLOB value.- Specified by:
writein classjava.io.Writer- Parameters:
cbuf- array of charactersoff- offset intocbuffrom which to start writing characterslen- number of characters to write- Throws:
java.io.IOException- if an I/O error occurs
-
-