Top Description Fields Constructors Methods
org.apache.derby.impl.jdbc

pack-priv final Class ClobUtf8Writer

extends Writer
Class Inheritance
Imports
java.io.IOException, .Writer, java.sql.SQLException, org.apache.derby.shared.common.reference.MessageId, org.apache.derby.shared.common.i18n.MessageService

Writer implementation for Clob.

Field Summary

Modifier and TypeField and Description
private boolean
private TemporaryClob
private long
Inherited from java.io.Writer:
lock

Constructor Summary

AccessConstructor and Description
pack-priv
ClobUtf8Writer(TemporaryClob
worker object for the CLOB value
control
,
long
initial byte position in the CLOB value
pos
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements abstract java.io.Writer.close.

Implements java.io.Closeable.close.

Closes the stream.

public void
flush()

Implements abstract java.io.Writer.flush.

Implements java.io.Flushable.flush.

Flushes the stream.

public void
write(char[]
array of characters
cbuf
,
int
offset into cbuf from which to start writing characters
off
,
int
number of characters to write
len
)

Implements abstract java.io.Writer.write.

Writes a portion of an array of characters to the CLOB value.

Inherited from java.io.Writer:
appendappendappendnullWriterwritewritewritewrite

Field Detail

closedback to summary
private boolean closed
controlback to summary
private TemporaryClob control
posback to summary
private long pos

Constructor Detail

ClobUtf8Writerback to summary
pack-priv ClobUtf8Writer(TemporaryClob control, long pos)

Constructor.

Parameters
control:TemporaryClob

worker object for the CLOB value

pos:long

initial byte position in the CLOB value

Method Detail

closeback to summary
public void close()

Implements abstract java.io.Writer.close.

Implements java.io.Closeable.close.

Closes the stream.

Once the stream has been closed, further write or flush invocations will cause an IOException to be thrown. Closing a previously closed stream has no effect.

flushback to summary
public void flush() throws IOException

Implements abstract java.io.Writer.flush.

Implements java.io.Flushable.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.

Exceptions
IOException:
if the stream has been closed
writeback to summary
public void write(char[] cbuf, int off, int len) throws IOException

Implements abstract java.io.Writer.write.

Writes a portion of an array of characters to the CLOB value.

Parameters
cbuf:char[]

array of characters

off:int

offset into cbuf from which to start writing characters

len:int

number of characters to write

Exceptions
IOException:
if an I/O error occurs