org.objectweb.jonathan.protocols.tcpip
Class TcpIpChunkProvider
- ChunkProvider
public class TcpIpChunkProvider
TcpIpChunkProvider is a ChunkProvider implementation encapsulating a socket input
stream.
duplicate
public Chunk duplicate()
throws JonathanException
Duplicates the whole chunk.
The default implementation copies the buffer,
and creates a new chunk with it.
- duplicate in interface Chunk
- a copy of this chunk.
duplicate
public Chunk duplicate(int off,
int t)
throws JonathanException
Partially duplicates this chunk. 'offset' must be greater than
the target chunk's offset, 'top' must be less or equal than the target's top.
The default implementation copies the appropriate portion of the buffer,
and creates a new chunk with it.
- duplicate in interface Chunk
- a chunk containing the specified part of the target chunk.
finalize
protected void finalize()
release
public void release()
Releases the chunk. The data of a chunk may be obtained from managed
buffers. It may thus be necessary to tell when the data encapsulated by a
chunk may be reused.
The default implementation resets offset and top to 0.
- release in interface Chunk