| java.lang.Object java.io.Reader uk.org.ponder.streamutil.DirectInputStreamReader
DirectInputStreamReader | public class DirectInputStreamReader extends Reader (Code) | | A more efficient and sane rendering of the standard Java InputStreamReader
class.
This version features:
No silly exceptions indicating lack of output space, but instead a proper streaming
architecture
No locking overhead, clearly anyone is silly enough to read from the same reader from two
different threads should do the locking himself.
Correct handling of UTF-16 in the decoder, the Sun version would overflow its buffer
on receiving any surrogate pairs in a UTF-8 stream.
Proper official names for UTF-16 and UTF-8 formats.
Powerful error handling architecture allows users to actually tell where in the input
stream the byte occured that failed conversion, Sun approach of randomly throwing exceptions
and then packing it in was simply not good enough.
Implementation of Markus Kuhn's "erroneous byte in erroneous surrogate" error encapsulation
strategy. This scheme allows proper rendering of erroneous bytes further on down the pipeline.
author: Antranig Basman |
subMode | protected boolean subMode(Code) | | |
DirectInputStreamReader | public DirectInputStreamReader()(Code) | | |
getCharacterEncoding | public String getCharacterEncoding()(Code) | | Returns the character set id for the conversion
|
read | public int read(char[] outbuffer, int outbufferpos, int length) throws IOException(Code) | | |
|
|