public class PacketOutputStream extends DataOutputStream
Message). It extends the DataOutputStream by
a single method that writes a Message. The main reason this class exists is
for symetry to the PacketInputStream.| Modifier and Type | Field and Description |
|---|---|
static int |
PACKETSIZE
Size of the packet header in bytes.
|
static int |
SINGLESIZE
The maximum size a single package can contain.
|
writtenout| Constructor and Description |
|---|
PacketOutputStream(OutputStream out)
Wraps a packet output stream on top of a data output stream.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
writeMultiPacket(Message m)
Not implemented (yet).
|
protected void |
writeSinglePacket(Message m)
Method to write a short mesaage to the stream as a single package.
|
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFclose, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwritepublic static final int SINGLESIZE
public static final int PACKETSIZE
public PacketOutputStream(OutputStream out)
protected void writeSinglePacket(Message m) throws IOException
IOExceptionprotected void writeMultiPacket(Message m) throws IOException
IOException