public class ByteBufferContentProvider extends AbstractTypedContentProvider
ContentProvider for ByteBuffers.
The position and limit of the ByteBuffers passed to the constructor are not modified,
and each invocation of the iterator() method returns a slice
of the original ByteBuffer.
ContentProvider.Typed| Constructor and Description |
|---|
ByteBufferContentProvider(ByteBuffer... buffers) |
ByteBufferContentProvider(String contentType,
ByteBuffer... buffers) |
| Modifier and Type | Method and Description |
|---|---|
long |
getLength() |
boolean |
isReproducible()
Whether this ContentProvider can produce exactly the same content more
than once.
|
Iterator<ByteBuffer> |
iterator() |
getContentTypeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic ByteBufferContentProvider(ByteBuffer... buffers)
public ByteBufferContentProvider(String contentType, ByteBuffer... buffers)
public long getLength()
public boolean isReproducible()
ContentProviderWhether this ContentProvider can produce exactly the same content more than once.
Implementations should return true only if the content can be
produced more than once, which means that invocations to Iterable.iterator()
must return a new, independent, iterator instance over the content.
The HttpClient implementation may use this method in particular
cases where it detects that it is safe to retry a request that failed.
public Iterator<ByteBuffer> iterator()
Copyright © 2010 - 2020 Adobe. All Rights Reserved