Package org.eclipse.jetty.client.util
Class BytesContentProvider
java.lang.Object
org.eclipse.jetty.client.util.AbstractTypedContentProvider
org.eclipse.jetty.client.util.BytesContentProvider
- All Implemented Interfaces:
Iterable<ByteBuffer>
,ContentProvider
,ContentProvider.Typed
- Direct Known Subclasses:
StringContentProvider
Deprecated.
A
ContentProvider
for byte arrays.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.client.api.ContentProvider
ContentProvider.Typed
-
Constructor Summary
ConstructorDescriptionBytesContentProvider
(byte[]... bytes) Deprecated.BytesContentProvider
(String contentType, byte[]... bytes) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionlong
Deprecated.boolean
Deprecated.Whether this ContentProvider can produce exactly the same content more than once.iterator()
Deprecated.Methods inherited from class org.eclipse.jetty.client.util.AbstractTypedContentProvider
getContentType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
BytesContentProvider
public BytesContentProvider(byte[]... bytes) Deprecated. -
BytesContentProvider
Deprecated.
-
-
Method Details
-
getLength
public long getLength()Deprecated.- Returns:
- the content length, if known, or -1 if the content length is unknown
-
isReproducible
public boolean isReproducible()Deprecated.Description copied from interface: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 toIterable.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.- Returns:
- whether the content can be produced more than once
-
iterator
Deprecated.
-
BytesRequestContent
instead.