|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dellroad.stuff.io.InputStreamReader
public class InputStreamReader
Reads zero or more InputStreams serialized inside an underlying InputStream by an OutputStreamWriter.
Instances of this class are thread safe, as are the InputStreams returned by read().
OutputStreamWriter| Constructor Summary | |
|---|---|
InputStreamReader(InputStream input)
Constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Close this instance. |
InputStream |
read()
Read the next InputStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InputStreamReader(InputStream input)
input - the underlying InputStream that will carry nested InputStreams within it| Method Detail |
|---|
public InputStream read()
throws IOException
InputStream.
The returned InputStream will remain valid as long as it has not been closed, the underlying input
has not been closed, and no subsequent invocation of this method has been made. As soon as any of those events occurs,
all subsequent accesses to the previously returned InputStream will throw an exception.
The returned InputStream may be closed prior to its EOF, in which case any remaining bytes will be skipped
over during the next invocation of this method.
Note: while any thread is blocked reading from the returned InputStream, this method will block as well.
IOException - if this instance is closed
IOException - if the underlying InputStream has thrown an exception
return - the next InputStream, or null if EOF has been reached on the underlying input
public void close()
throws IOException
This closes the underlying input; however, if the InputStream most recently returned from read()
is still open, the close of the underlying input will be postponed until it is no longer open.
IOException - if an there is an error closing the underlying InputStream
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||