osmq.io
Class PacketOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
osmq.io.PacketOutputStream
- All Implemented Interfaces:
- WriterStream
- Direct Known Subclasses:
- PacketFileOutputStream, ZipPacketFileOutputStream, ZipPacketOutputStream
- public class PacketOutputStream
- extends java.io.FilterOutputStream
- implements WriterStream
Method Summary |
void |
println(java.lang.String s)
|
void |
write(byte[] b,
int offset,
int size)
Writes the byte array to the underlying output stream,
maintaining size information so that the corollary BytePacketReader
can fetch packets in the same byte size units. |
void |
writeBytes(byte[] value)
|
void |
writeNull()
Writes a null object to the stream which is ignored by
the corresponding PacketInputStream. |
Methods inherited from class java.io.FilterOutputStream |
close, flush, write, write |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NULL_INT_ARRAY
public static final byte[] NULL_INT_ARRAY
PacketOutputStream
public PacketOutputStream(java.io.OutputStream out)
writeNull
public void writeNull()
throws java.io.IOException
- Writes a null object to the stream which is ignored by
the corresponding PacketInputStream. This method is used
for testing whether a socket stream is still active.
- Specified by:
writeNull
in interface WriterStream
- Throws:
java.io.IOException
println
public void println(java.lang.String s)
throws java.io.IOException
- Specified by:
println
in interface WriterStream
- Throws:
java.io.IOException
writeBytes
public void writeBytes(byte[] value)
throws java.io.IOException
- Specified by:
writeBytes
in interface WriterStream
- Throws:
java.io.IOException
write
public void write(byte[] b,
int offset,
int size)
throws java.io.IOException
- Writes the byte array to the underlying output stream,
maintaining size information so that the corollary BytePacketReader
can fetch packets in the same byte size units.
This method overrides the base method of any underlying
OutputStream implementation.
- Throws:
java.io.IOException