java.lang.Object
org.eclipse.jetty.io.content.ByteBufferContentSource
org.eclipse.jetty.client.ByteBufferRequestContent
- All Implemented Interfaces:
Request.Content,org.eclipse.jetty.io.Content.Source
- Direct Known Subclasses:
BytesRequestContent
public class ByteBufferRequestContent
extends org.eclipse.jetty.io.content.ByteBufferContentSource
implements Request.Content
A Request.Content for ByteBuffers.
The position and limit of the ByteBuffers passed to the constructor are not modified;
content production returns a slice of the original ByteBuffer.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Content.Source
org.eclipse.jetty.io.Content.Source.Factory -
Constructor Summary
ConstructorsConstructorDescriptionByteBufferRequestContent(String contentType, ByteBuffer... byteBuffers) ByteBufferRequestContent(String contentType, Collection<ByteBuffer> byteBuffers) ByteBufferRequestContent(ByteBuffer... byteBuffers) -
Method Summary
Methods inherited from class org.eclipse.jetty.io.content.ByteBufferContentSource
demand, fail, getByteBuffers, getLength, read, rewindMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jetty.io.Content.Source
demand, fail, fail, getLength, read, rewind
-
Constructor Details
-
ByteBufferRequestContent
-
ByteBufferRequestContent
-
ByteBufferRequestContent
-
-
Method Details
-
getContentType
- Specified by:
getContentTypein interfaceRequest.Content- Returns:
- the value of the
Content-Typeheader for the request content, such astext/html;charset=utf-8orapplication/json, ornullto use the value fromHttpClient.getDefaultRequestContentType()
-