org.objectweb.jonathan.resources.lib
Class SimpleChunkFactory

java.lang.Object
  extended byorg.objectweb.jonathan.resources.lib.SimpleChunkFactory
All Implemented Interfaces:
ChunkFactory

public final class SimpleChunkFactory
extends Object
implements ChunkFactory

A naive Chunk Factory implementation : it simply returns chunks on demand.


Method Summary
 Chunk newChunk()
          Returns a chunk of a default size.
 Chunk newChunk(int size)
          Returns a chunk of (at least) the specified size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newChunk

public Chunk newChunk()
Returns a chunk of a default size.

Specified by:
newChunk in interface ChunkFactory
Returns:
a chunk

newChunk

public Chunk newChunk(int size)
Returns a chunk of (at least) the specified size.

Specified by:
newChunk in interface ChunkFactory
Parameters:
size - the expected size of the chunk.
Returns:
a chunk