public class SimpleInputStreamReader
extends java.io.Reader
// It does not work like this
Reader r=new InputStreamReader(new ByteArrayInputStream(new byte[]{(byte)144}));
System.out.println(r.read());
r.close();
-----> 65533
// But it does like this
r=new SimpleInputStreamReader(new ByteArrayInputStream(new byte[]{(byte)144}));
System.out.println(r.read());
r.close();
-----> 144
| Modifier and Type | Field and Description |
|---|---|
java.io.InputStream |
in |
| Constructor and Description |
|---|
SimpleInputStreamReader(java.io.File f) |
SimpleInputStreamReader(java.io.InputStream i) |
SimpleInputStreamReader(java.lang.String f) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static void |
main(java.lang.String[] args) |
int |
read() |
int |
read(char[] cbuf,
int off,
int len) |
public SimpleInputStreamReader(java.io.InputStream i)
public SimpleInputStreamReader(java.io.File f)
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic SimpleInputStreamReader(java.lang.String f)
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.Readerjava.io.IOExceptionpublic int read(char[] cbuf,
int off,
int len)
throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception