|
Sharkysoft home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.io.Reader
|
+--lava.io.AsciiInputStreamReader
Converts byte stream to char stream without decoding.
Details: AsciiInputStreamReader converts a binary InputStream to a Reader. Each byte from the source InputStream is converted to a char. This class is useful for parsing streams that contain mixtures of ASCII and binary data.
| Fields inherited from class java.io.Reader |
lock |
| Constructor Summary | |
AsciiInputStreamReader(java.io.InputStream in)
Initializes with InputStream. |
|
| Method Summary | |
void |
close()
Closes this Reader. |
int |
read()
Reads one byte. |
int |
read(char[] buff,
int off,
int len)
Reads bytes from the input stream. |
| Methods inherited from class java.io.Reader |
mark, markSupported, read, ready, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AsciiInputStreamReader(java.io.InputStream in)
Details: This constructor initializes a new AsciiInputStreamReader with the given InputStream.
in - the InputStream| Method Detail |
public int read()
throws java.io.IOException
Details: read reads a single byte from the InputStream and returns it as a char.
read in class java.io.Reader
public int read(char[] buff,
int off,
int len)
throws java.io.IOException
Details: read reads len bytes from the InputStream, converts them to chars, and stores them in buff, beginning at offset off. The return value is the number of bytes read and converted, or -1 if no bytes were read and the EOS was reached.
read in class java.io.Readerbuff - the destination bufferoff - the offsetlen - the number of bytes to readjava.io.IOException - if an I/O error occurs
public void close()
throws java.io.IOException
Reader.
Details: close closes the source InputStream by calling it's close method.
close in class java.io.Readerjava.io.IOException - if an I/O error occurs
|
Sharkysoft home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||