public class InputStreamReader extends Reader
| Constructor and Description |
|---|
InputStreamReader(InputStream is)
Create an InputStreamReader that uses the default character encoding.
|
InputStreamReader(InputStream is,
String enc)
Create an InputStreamReader that uses the named character encoding.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the stream.
|
void |
mark(int readAheadLimit)
Mark the present position in the stream.
|
boolean |
markSupported()
Tell whether this stream supports the mark() operation.
|
int |
read()
Read a single character.
|
int |
read(char[] cbuf,
int off,
int len)
Read characters into a portion of an array.
|
boolean |
ready()
Tell whether this stream is ready to be read.
|
void |
reset()
Reset the stream.
|
long |
skip(long n)
Skip characters.
|
public InputStreamReader(InputStream is)
public InputStreamReader(InputStream is, String enc) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic void close()
throws IOException
close in interface AutoCloseableclose in class ReaderIOExceptionpublic void mark(int readAheadLimit)
throws IOException
mark in class ReaderIOExceptionpublic boolean markSupported()
markSupported in class Readerpublic int read()
throws IOException
read in class ReaderIOExceptionpublic int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOExceptionpublic boolean ready()
throws IOException
ready in class ReaderIOExceptionpublic void reset()
throws IOException
reset in class ReaderIOExceptionpublic long skip(long n)
throws IOException
skip in class ReaderIOException