org.objectweb.jonathan.resources.api
Interface ChunkFactory

All Known Implementing Classes:
JChunkFactory, SimpleChunkFactory

public interface ChunkFactory

A chunk factory builds chunks, possibly implementing a specific chunk management policy.


Method Summary
 Chunk newChunk()
          Returns a chunk.
 Chunk newChunk(int size)
          Returns a chunk whose associated array of bytes is (at least) of size size.
 

Method Detail

newChunk

Chunk newChunk()
Returns a chunk. The offset and top of this chunk are 0.

Returns:
a chunk.

newChunk

Chunk newChunk(int size)
Returns a chunk whose associated array of bytes is (at least) of size size. Its offset and top are always 0.

Parameters:
size - the size of the expected chunk.
Returns:
a chunk.