Name
InputStreamReader
Synopsis
InputStreamReader is a subclass of Reader
that reads bytes from an underlying 8-bit input stream and converts them to
Unicode characters. The mapping of the bytes from the
InputStream to the characters returned
by the InputStreamReader is performed using the
encoding specified in the constructor, or the default encoding of the host
platform if the single-argument constructor is used.
Note that InputStreamReader supports the
mark() and reset() methods only if
the underlying InputStream does.
CLDC devices typically support only their own default encoding. Hence, it
is unlikely that many alternative encodings will be available. The CLDC
specification does not provide any mechanism that would allow application
code to determine the available encodings at runtime apart from the default
encoding, which can be obtained from the system property
microedition.encoding. The CLDC version of
this class does not include the getEncoding() method
from J2SE, which returns the name of the encoding used by an
InputStreamReader.
public class InputStreamReader extends Reader {
// Public Constructors
public InputStreamReader( InputStream is);
public InputStreamReader(InputStream is,
String enc) throws UnsupportedEncodingException;
// Public Methods Overriding Reader
public void close() throws IOException;
public void mark( int readAheadLimit) throws IOException; public ...Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access