org.objectweb.jonathan.resources.lib

Class SimpleChunkFactory

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.

Method Details

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