juju.reattore.io
Interface BulkByteSource

All Superinterfaces:
ByteSource, Source
All Known Implementing Classes:
ChannelFileSource

public interface BulkByteSource
extends ByteSource

A source that can also serve a large chunk directly as a byte buffer.


Field Summary
 
Fields inherited from interface juju.reattore.io.Source
EOF
 
Method Summary
 java.nio.ByteBuffer getBulk()
          Returns the next chunk of the source in a ByteBuffer.
 
Methods inherited from interface juju.reattore.io.ByteSource
get, get, remaining
 
Methods inherited from interface juju.reattore.io.Source
dispose
 

Method Detail

getBulk

public java.nio.ByteBuffer getBulk()
                            throws java.io.IOException
Returns the next chunk of the source in a ByteBuffer. This buffer should be read until empty. Subsequent calls advance on by the buffer size and ignore any unread data in the buffer. The buffer is empty (remaining = 0) on EOF.

Returns:
The next chunk of the source in a buffer.
Throws:
java.io.IOException - on error.


Copyright © 2002-2003 Michael Hope. All Rights Reserved.