public class BytesContentProvider extends AbstractTypedContentProvider
ContentProvider
for byte arrays.ContentProvider.Typed
Constructor and Description |
---|
BytesContentProvider(byte[]... bytes) |
BytesContentProvider(java.lang.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.
|
java.util.Iterator<java.nio.ByteBuffer> |
iterator() |
getContentType
public BytesContentProvider(byte[]... bytes)
public BytesContentProvider(java.lang.String contentType, byte[]... bytes)
public long getLength()
public boolean isReproducible()
ContentProvider
Whether 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–2023 Webtide. All rights reserved.