org.objectweb.jonathan.resources.api

Interface ChunkProvider

Known Implementing Classes:
TcpIpChunkProvider

public interface ChunkProvider

Chunk providers are used to wrap input streams (like, e.g., socket input streams) in unmarshallers.

See Also:
MarshallerFactory

Method Summary

void
close()
Closes the chunk provider.
Chunk
prepare()
Returns a chunk to read data from.

Method Details

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.

Returns:
a chunk;