Package org.apache.derby.impl.drda
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 int
private char[]
private ByteArrayInputStream
private OutputStreamWriter
private Reader
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.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:
available
in classInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
finalize
- Overrides:
finalize
in classObject
- Throws:
IOException
-