org.objectweb.jonathan.libs.resources
Class SimpleChunkFactory
java.lang.Object
|
+--org.objectweb.jonathan.libs.resources.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 |
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