java.io.InputStreamReader (JDK 1.1)
This class is a character input stream that uses a byte input stream as its data source: it reads bytes from a specified InputStream and translates them into Unicode characters according to a particular platform- and locale-dependent character encoding. This is a very important internationalization feature in Java 1.1.
When you create an InputStreamReader, you specify an InputStream from which the InputStreamReader is to read bytes, and you also optionally specify the name of the character encoding used by those bytes. If you do not specify an encoding name, the InputStreamReader uses the default encoding for the default locale, which is usually the correct thing to do.
The InputStreamReader supports the standard Reader methods. It also has a getEncoding() method that returns the name of the encoding being used to convert bytes to characters.
public classInputStreamReaderextends Reader { //Public ConstructorspublicInputStreamReader(InputStreamin); publicInputStreamReader(InputStreamin, Stringenc) throws UnsupportedEncodingException; //Public Instance Methodspublic voidclose() throws IOException; //Defines Readerpublic StringgetEncoding(); public intread() throws IOException; //Overrides Readerpublic intread(char[]cbuf, intoff, intlen) throws IOException; //Defines Readerpublic booleanready() throws IOException; //Overrides Reader}
Hierarchy:
Object->Reader->InputStreamReader
Extended By:
FileReader