|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
edu.rit.m2mp.MessageOutputStream
public class MessageOutputStream
Class MessageOutputStream provides an output stream for writing the contents
of an outgoing Many-to-Many Protocol (M2MP) message. A message output stream
is not constructed directly. Rather, it is obtained by calling the
createOutgoingMessage() method in class M2MP
.
Method Summary | |
---|---|
void |
close()
Close this message output stream. |
void |
flush()
Flush this message output stream. |
void |
write(byte[] buf)
Write the given byte array to this message output stream. |
void |
write(byte[] buf,
int off,
int len)
Write a portion of the given byte array to this message output stream. |
void |
write(int b)
Write the given byte to this message output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void write(int b) throws IOException
write
in class OutputStream
b
- Byte.
IOException
- Thrown if an I/O error occurred.public void write(byte[] buf) throws IOException
write
in class OutputStream
buf
- Byte array.
NullPointerException
- (unchecked exception) Thrown if buf is null.
IOException
- Thrown if an I/O error occurred.public void write(byte[] buf, int off, int len) throws IOException
write
in class OutputStream
buf
- Byte array.off
- Index of the first byte to write.len
- Number of bytes to write.
NullPointerException
- (unchecked exception) Thrown if buf is null.
IndexOutOfBoundsException
- (unchecked exception) Thrown if off < 0, len
< 0, or off+len > buf.length.
IOException
- Thrown if an I/O error occurred.public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
- Thrown if an I/O error occurred.public void close() throws IOException
close
in interface Closeable
close
in class OutputStream
IOException
- Thrown if an I/O error occurred.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |