java.io
Class InputStreamReader

java.lang.Object
  extended by java.io.Reader
      extended by java.io.InputStreamReader

public class InputStreamReader
extends Reader


Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
InputStreamReader(InputStream in)
           
InputStreamReader(InputStream in, String charsetName)
           
 
Method Summary
 void close()
          Close this Reader.
 int read(char[] cbuf, int off, int len)
          Reads at most count characters from this Reader and stores them at offset in the character array buf.
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, ready, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, println, toString
 

Constructor Detail

InputStreamReader

public InputStreamReader(InputStream in)

InputStreamReader

public InputStreamReader(InputStream in,
                         String charsetName)
Method Detail

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Description copied from class: Reader
Reads at most count characters from this Reader and stores them at offset in the character array buf. Returns the number of characters actually read or -1 if the end of reader was encountered.

Specified by:
read in class Reader
Parameters:
cbuf - character array to store the read characters
off - offset in buf to store the read characters
len - how many characters should be read in
Returns:
how many characters were successfully read in or else -1 if the end of the reader was detected.
Throws:
IOException - If the Reader is already closed or some other IO error occurs.

close

public void close()
           throws IOException
Description copied from class: Reader
Close this Reader. This must be implemented by any concrete subclasses. The implementation should free any resources associated with the Reader.

Specified by:
close in class Reader
Throws:
IOException - If an error occurs attempting to close this Reader.