org.objectweb.jonathan.resources.api
Interface ChunkProvider
- TcpIpChunkProvider
public interface ChunkProvider
Chunk providers are used to wrap input streams (like, e.g., socket input streams)
in unmarshallers.
MarshallerFactory
void | close() - Closes the chunk provider.
|
Chunk | prepare() - Returns a chunk to read data from.
|
close
public void close()
Closes the chunk provider. This method must be called if the target provider
is no longer used.
prepare
public Chunk prepare()
throws JonathanException
Returns a chunk to read data from.
When done with the chunk, its user must update its
offset
and
top
members and
release
it.
ChunkProviders should not be used concurrently.
- a chunk;