Class EncodedInputStream

java.lang.Object
java.io.InputStream
org.apache.derby.client.net.EncodedInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public final class EncodedInputStream extends InputStream
Create an encoded stream from a Reader. This is an internal class, used to pass readers of characters as streams of bytes. The characters will be represented according to the specified encoding. It is up to the caller to ensure the specified encoding is available, and in general only encodings available as default from Java 1.3 and up should be used. Currently, the encodings 'UTF8' and 'UTF-16BE' are used. Streams are obtained by calling the static methods of this class, for instance createUTF8Stream.
  • Field Details

  • Constructor Details

    • EncodedInputStream

      private EncodedInputStream(Reader reader, Charset encoding, int charBufferSize, int initialByteBufferSize)
      Create an encoded stream for the specified Reader.
      Parameters:
      reader - the Reader to read characters from
      encoding - the encoding to use in the encoded stream
      charBufferSize - the size of the char buffer. This is the number of characters read at once from the Reader.
      initialByteBufferSize - the initial size of the byte buffer. holding the encoded bytes
  • Method Details