public final class EncodedInputStream extends InputStream
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.| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
static EncodedInputStream |
createUTF8Stream(Reader reader)
Create a UTF-8 encoded stream from the given
Reader. |
protected void |
finalize() |
int |
read() |
mark, markSupported, read, read, reset, skippublic static EncodedInputStream createUTF8Stream(Reader reader)
Reader.reader - the Reader to read characters from.public int available()
throws IOException
available in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionprotected void finalize()
throws IOException
finalize in class ObjectIOExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.