|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.client.toolkit.activity.delivery.DataTransportBlockReader
A BlockReader implementation which fetches each block
from a DataTransport output stream.
| Constructor Summary | |
DataTransportBlockReader(DataTransport service)
Default constructor. |
|
DataTransportBlockReader(DataTransport service,
int blocksToFetch)
Default constructor. |
|
| Method Summary | |
java.lang.Object |
fetchBlock()
Obtain a block from the DataTransport output stream, or return null
if the end of the stream has been reached. |
boolean |
hasNext()
Returns whether there are any more blocks. |
java.lang.Object |
next()
Returns the next block from the buffer and fetches the subsequent block from the DataTransport output stream and sticks this in the buffer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DataTransportBlockReader(DataTransport service)
throws ResourceException,
DataFormatException,
ServiceCommsException
service - the DataTransport object for the DS which is configured with a DT output stream
DataFormatException
ServiceCommsException
ResourceException
public DataTransportBlockReader(DataTransport service,
int blocksToFetch)
throws ResourceException,
DataFormatException,
ServiceCommsException
service - the DataTransport object for the DS which is configured with a DT output streamblocksToFetch - the number of blocks to fetch from the DataTransport output stream at once. These blocks
will be amalgamated into a single block, returned by the next() method.
DataFormatException
ServiceCommsException
ResourceException| Method Detail |
public boolean hasNext()
hasNext in interface BlockReadertrue iff there are any more blockspublic java.lang.Object next()
next in interface BlockReader
public java.lang.Object fetchBlock()
throws ResourceException,
DataFormatException,
ServiceCommsException
null
if the end of the stream has been reached.
null
DataFormatException
ServiceCommsException
ResourceException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||