Name

java.io.InputStreamReader

Synopsis

This class is a slightly modified version of the InputStreamReader class used in J2SE. The class creates a character input stream, which translates data coming from a byte input stream, based on a specific encoding. The read() method reads in a single character value or an array of characters. The skip() method skips over the specified number of characters. The ready() method returns a Boolean, indicating whether the stream is ready to be read.

public classInputStreamReader extends java.io.Reader {
   // constructors
   public InputStreamReader(InputStream is);
   public InputStreamReader(InputStream is, String enc)
      throws java.io.UnsupportedEncodingException;

   // public instance methods
   public void close() throws java.io.IOException;
   public void mark(int readAheadLimit) throws java.io.IOException;
   public boolean markSupported();
   public int read() throws java.io.IOException;
   public int read(char[] cbuf, int off, int len)
      throws java.io.IOException;
   public boolean ready() throws java.io.IOException;
   public void reset() throws java.io.IOException;
   public long skip(long n) throws java.io.IOException;
}

Get Wireless Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.