net.metanotion.util
Class ByteChunkOutputStream

java.lang.Object
  extended by net.metanotion.util.ByteChunkOutputStream
All Implemented Interfaces:
ObjectOutputStream<byte[]>

public final class ByteChunkOutputStream
extends java.lang.Object
implements ObjectOutputStream<byte[]>


Constructor Summary
ByteChunkOutputStream(java.io.OutputStream os)
           
 
Method Summary
 void close()
          Close the stream.
 void flush()
          Flush any "pending" "writes" in the stream.
 void write(byte[] d)
          Write an object to the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteChunkOutputStream

public ByteChunkOutputStream(java.io.OutputStream os)
Method Detail

write

public void write(byte[] d)
Description copied from interface: ObjectOutputStream
Write an object to the stream.

Specified by:
write in interface ObjectOutputStream<byte[]>
Parameters:
d - the object to write.

close

public void close()
Description copied from interface: ObjectOutputStream
Close the stream.

Specified by:
close in interface ObjectOutputStream<byte[]>

flush

public void flush()
Description copied from interface: ObjectOutputStream
Flush any "pending" "writes" in the stream. The semantics of this call are subject to the nature of the stream. If it is relevant, this should ensure that any I/O buffers are flushed to persistent storage or flushed to the network. However, it is acceptable for an implmentation to stub this out and do nothing with it. If implemented, this method must block until its I/O operations are completed.

Specified by:
flush in interface ObjectOutputStream<byte[]>