|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonathan.resources.api.Chunk
org.objectweb.jonathan.protocols.tcpip.TcpIpChunkProvider
TcpIpChunkProvider is a ChunkProvider implementation encapsulating a socket input stream.
Field Summary |
Fields inherited from class org.objectweb.jonathan.resources.api.Chunk |
data, next, offset, top |
Method Summary | |
void |
close()
Closes the chunk provider. |
Chunk |
duplicate()
Duplicates the whole chunk. |
Chunk |
duplicate(int off,
int t)
Partially duplicates this chunk. |
protected void |
finalize()
|
Chunk |
prepare()
Returns a chunk to read data from. |
void |
release()
Releases the chunk. |
Methods inherited from class org.objectweb.jonathan.resources.api.Chunk |
toString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public Chunk prepare() throws org.objectweb.jonathan.apis.kernel.JonathanException
ChunkProvider
When done with the chunk, its user must update its
offset
and top
members and
release
it.
ChunkProviders should not be used concurrently.
prepare
in interface ChunkProvider
org.objectweb.jonathan.apis.kernel.JonathanException
- if no chunk can be provided.public void close()
ChunkProvider
close
in interface ChunkProvider
protected void finalize()
public Chunk duplicate() throws org.objectweb.jonathan.apis.kernel.JonathanException
Chunk
The default implementation copies the buffer, and creates a new chunk with it.
duplicate
in class Chunk
org.objectweb.jonathan.apis.kernel.JonathanException
public Chunk duplicate(int off, int t) throws org.objectweb.jonathan.apis.kernel.JonathanException
Chunk
The default implementation copies the appropriate portion of the buffer, and creates a new chunk with it.
duplicate
in class Chunk
off
- the offset of the chunk copy.t
- the top of the chunk copy.
org.objectweb.jonathan.apis.kernel.JonathanException
public void release()
Chunk
The default implementation resets offset and top to 0.
release
in class Chunk
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |