public class BytesContentProvider extends AbstractTypedContentProvider
ContentProvider for byte arrays.ContentProvider.Typed| Constructor and Description |
|---|
BytesContentProvider(byte[]... bytes) |
BytesContentProvider(String contentType,
byte[]... bytes) |
| 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 BytesContentProvider(byte[]... bytes)
public BytesContentProvider(String contentType, byte[]... bytes)
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