uk.org.ogsadai.common
Interface BlockWriter

All Known Subinterfaces:
Pipe
All Known Implementing Classes:
CallThroughExternalPipe, CallThroughPipe, NonBufferingPipe, SimplePipe, SynchronizedGrowableExternalPipe, SynchronizedGrowablePipe, SynchronizedPipe

public interface BlockWriter

This is an interface used for writing blocks of output data.

Author:
The OGSA-DAI Project Team

Method Summary
 void close()
          Closes the block writer to indicate that there are no more blocks are to be written.
 boolean isOpen()
          Indicates whether or not the block writer is open for writing via the put method.
 void put(java.lang.Object block)
          Writes the specified block of output data.
 

Method Detail

put

public void put(java.lang.Object block)
Writes the specified block of output data.

Parameters:
block - the Object block to write
Throws:
java.lang.IllegalStateException - if the block writer has been closed

close

public void close()
Closes the block writer to indicate that there are no more blocks are to be written. After close has been called, the put method should no longer be used.


isOpen

public boolean isOpen()
Indicates whether or not the block writer is open for writing via the put method. After the close method has been invoked this method should return false.

Returns:
A boolean value indicating whether this block writer is open for writing