| java.lang.Object java.io.InputStream org.apache.derby.iapi.types.ReaderToUTF8Stream
ReaderToUTF8Stream | final public class ReaderToUTF8Stream extends InputStream (Code) | | Converts a java.io.Reader to the on-disk UTF8 format used by Derby
for character types.
|
Constructor Summary | |
public | ReaderToUTF8Stream(Reader appReader, int valueLength, int numCharsToTruncate, String typeName) Create a stream that will truncate trailing blanks if required/allowed.
If the stream must be truncated, the number of blanks to truncate
is specified to allow the stream to be checked for exact length, as
required by JDBC 3.0. | public | ReaderToUTF8Stream(Reader appReader, int maximumLength, String typeName) Create a UTF-8 stream for a length less application reader.
A limit is placed on the length of the reader. |
Method Summary | |
final public int | available() | public void | close() | public int | read() read from stream; characters converted to utf-8 derby specific encoding. | public int | read(byte b, int off, int len) |
ReaderToUTF8Stream | public ReaderToUTF8Stream(Reader appReader, int valueLength, int numCharsToTruncate, String typeName)(Code) | | Create a stream that will truncate trailing blanks if required/allowed.
If the stream must be truncated, the number of blanks to truncate
is specified to allow the stream to be checked for exact length, as
required by JDBC 3.0. If the stream is shorter or longer than specified,
an exception is thrown during read.
Parameters: appReader - application reader Parameters: valueLength - the length of the reader in characters Parameters: numCharsToTruncate - the number of trailing blanks to truncate Parameters: typeName - type name of the column data is inserted into |
ReaderToUTF8Stream | public ReaderToUTF8Stream(Reader appReader, int maximumLength, String typeName)(Code) | | Create a UTF-8 stream for a length less application reader.
A limit is placed on the length of the reader. If the reader exceeds
the maximum length, truncation of trailing blanks is attempted. If
truncation fails, an exception is thrown.
Parameters: appReader - application reader Parameters: maximumLength - maximum allowed length in number of characters forthe reader Parameters: typeName - type name of the column data is inserted into throws: IllegalArgumentException - if maximum length is negative, or typename is null
|
available | final public int available()(Code) | | Return an optimized version of bytes available to read from
the stream
Note, it is not exactly per java.io.InputStream#available()
|
read | public int read() throws IOException(Code) | | read from stream; characters converted to utf-8 derby specific encoding.
If stream has been read, and eof reached, in that case any subsequent
read will throw an EOFException
See Also: java.io.InputStream.read |
|
|