public interface ContentProvider extends Iterable<ByteBuffer>
ContentProvider
provides a source of request content.
Implementations should return an Iterator
over the request content.
If the request content comes from a source that needs to be closed (for
example, an InputStream
), then the iterator implementation class
must implement Closeable
and will be closed when the request is
completed (either successfully or failed).
Applications should rely on utility classes such as ByteBufferContentProvider
or PathContentProvider
.
Copyright © 1995-2014 Mort Bay Consulting. All Rights Reserved.