|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
edu.rit.m2mp.MessageInputStream
public class MessageInputStream
Class MessageInputStream provides an input stream for reading the contents
of an incoming Many-to-Many Protocol (M2MP) message. A message input stream
is not constructed directly. Rather, it is obtained by calling the
acceptIncomingMessage() method in class M2MP
.
Method Summary | |
---|---|
int |
available()
Determine the number of bytes available from this message input stream. |
void |
close()
Close this message input stream. |
protected void |
finalize()
Finalize this message input stream. |
int |
read()
Read the next byte from this message input stream. |
int |
read(byte[] buf)
Read the given byte array from this message input stream. |
int |
read(byte[] buf,
int off,
int len)
Read a portion of the given byte array from this message input stream. |
long |
skip(long len)
Skip over and discard the given number of bytes from this message input stream. |
Methods inherited from class java.io.InputStream |
---|
mark, markSupported, reset |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int read() throws IOException
read
in class InputStream
IOException
- Thrown if an I/O error occurred.public int read(byte[] buf) throws IOException
read
in class InputStream
buf
- Byte array.
NullPointerException
- (unchecked exception) Thrown if buf is null.
IOException
- Thrown if an I/O error occurred.public int read(byte[] buf, int off, int len) throws IOException
read
in class InputStream
buf
- Byte array.off
- Index of first byte to read.len
- Maximum number of bytes to read.
NullPointerException
- (unchecked exception) Thrown if buf is null.
IndexOutOfBoundsException
- (unchecked exception) Thrown if off < 0, len
< 0, or off+len > the length of buf.
IOException
- Thrown if an I/O error occurred.public long skip(long len) throws IOException
skip
in class InputStream
len
- Maximum number of bytes to skip.
IllegalArgumentException
- (unchecked exception) Thrown if len < 0.
IOException
- Thrown if an I/O error occurred.public int available() throws IOException
available
in class InputStream
IOException
- Thrown if an I/O error occurred.public void close()
close
in interface Closeable
close
in class InputStream
protected void finalize()
finalize
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |