org.apache.derby.impl.drda
Class ReEncodedInputStream
java.lang.Object
java.io.InputStream
org.apache.derby.impl.drda.ReEncodedInputStream
- All Implemented Interfaces:
- java.io.Closeable
public class ReEncodedInputStream
- extends java.io.InputStream
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.
Methods inherited from class java.io.InputStream |
mark, markSupported, read, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BUFFERED_CHAR_LEN
private static final int BUFFERED_CHAR_LEN
- See Also:
- Constant Field Values
reader_
private java.io.Reader reader_
decodedBuffer_
private char[] decodedBuffer_
encodedStreamWriter_
private java.io.OutputStreamWriter encodedStreamWriter_
encodedOutputStream_
private ReEncodedInputStream.PublicBufferOutputStream encodedOutputStream_
encodedInputStream_
private java.io.ByteArrayInputStream encodedInputStream_
ReEncodedInputStream
public ReEncodedInputStream(java.io.Reader reader)
throws java.io.IOException
- Throws:
java.io.IOException
reEncode
private java.io.ByteArrayInputStream reEncode(java.io.Reader reader)
throws java.io.IOException
- Throws:
java.io.IOException
available
public int available()
throws java.io.IOException
- Overrides:
available
in class java.io.InputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read()
throws java.io.IOException
- Specified by:
read
in class java.io.InputStream
- Throws:
java.io.IOException
finalize
protected void finalize()
throws java.io.IOException
- Overrides:
finalize
in class java.lang.Object
- Throws:
java.io.IOException
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.