net.metanotion.util
Interface ObjectOutputStream<I>

All Known Implementing Classes:
ByteChunkOutputStream, ChannelBusMessageOutputStream, MINAMessageOutputStream

public interface ObjectOutputStream<I>

Similar to a java.io.OutputStream, except using generics to present of a stream of type I objects.


Method Summary
 void close()
          Close the stream.
 void flush()
          Flush any "pending" "writes" in the stream.
 void write(I d)
          Write an object to the stream.
 

Method Detail

write

void write(I d)
           throws ObjectStreamClosedException
Write an object to the stream.

Parameters:
d - the object to write.
Throws:
ObjectStreamClosedException - if the stream has been closed.

close

void close()
Close the stream.


flush

void flush()
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.