public class RiverInputStream
extends java.io.InputStream
implements AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this resource, relinquishing any underlying resources.
|
int |
getBlockCount()
Return the number of blocks that the input data is comprised of (the size
of each block varies depending on the amount of data recieved at once, so
this information may only be useful for fine-tuning).
|
boolean |
isClosed()
Returns the closed state of this stream.
|
int |
read()
Reads the next byte of data from the input stream.
|
boolean |
readBoolean()
Reads a boolean flag from this input stream.
|
String |
readString()
Reads the next ASCIIZ String from the input stream.
|
public void close()
close
in interface java.io.Closeable
close
in interface AutoCloseable
close
in class java.io.InputStream
public int getBlockCount()
public boolean isClosed()
public int read() throws java.io.IOException
int
in the range 0
to
255
. If no byte is available because the end of the stream
has been reached, the value -1
is returned. This method
blocks until input data is available, the end of the stream is detected,
or an exception is thrown.read
in class java.io.InputStream
-1
if the end of the stream is
reachedjava.io.IOException
- If an I/O error occurs, such as the Stream has
been closedpublic boolean readBoolean() throws java.io.IOException
boolean
flagjava.io.IOException
- If an I/O error occurs, such as the Stream has
been closedpublic String readString() throws java.io.IOException
java.io.IOException
- If an I/O error occurs, such as the Stream has
been closed