java.lang.Iterable<java.nio.ByteBuffer>, ContentProvider, ContentProvider.TypedStringContentProviderpublic class BytesContentProvider extends AbstractTypedContentProvider
ContentProvider for byte arrays.ContentProvider.Typed| Constructor | Description |
|---|---|
BytesContentProvider(byte[]... bytes) |
|
BytesContentProvider(java.lang.String contentType,
byte[]... bytes) |
| Modifier and Type | Method | Description |
|---|---|---|
long |
getLength() |
|
boolean |
isReproducible() |
Whether this ContentProvider can produce exactly the same content more
than once.
|
java.util.Iterator<java.nio.ByteBuffer> |
iterator() |
getContentTypepublic BytesContentProvider(byte[]... bytes)
public BytesContentProvider(java.lang.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 java.util.Iterator<java.nio.ByteBuffer> iterator()
Copyright © 1995–2018 Webtide. All rights reserved.