Class ReEncodedInputStream
java.lang.Object
java.io.InputStream
org.apache.derby.impl.drda.ReEncodedInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
ReEncodedInputStream passes
stream from Reader, which is stream of decoded style,
to user of this subclass of InputStream, which is stream of encoded style.
The encoding of stream passed to user is limited to UTF8.
This class will be used to pass stream, which is served as a Reader,
as a InputStream of a arbitrary encoding.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate char[]private ByteArrayInputStreamprivate OutputStreamWriterprivate Reader -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class InputStream
mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
BUFFERED_CHAR_LEN
private static final int BUFFERED_CHAR_LEN- See Also:
-
reader_
-
decodedBuffer_
private char[] decodedBuffer_ -
encodedStreamWriter_
-
encodedOutputStream_
-
encodedInputStream_
-
-
Constructor Details
-
ReEncodedInputStream
- Throws:
IOException
-
-
Method Details
-
reEncode
- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
finalize
- Overrides:
finalizein classObject- Throws:
IOException
-