Class ByteBufferRequestContent

java.lang.Object
org.eclipse.jetty.io.content.ByteBufferContentSource
org.eclipse.jetty.client.ByteBufferRequestContent
All Implemented Interfaces:
Request.Content, Content.Source
Direct Known Subclasses:
BytesRequestContent

public class ByteBufferRequestContent extends 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.

  • Constructor Details

    • ByteBufferRequestContent

      public ByteBufferRequestContent(ByteBuffer... byteBuffers)
    • ByteBufferRequestContent

      public ByteBufferRequestContent(String contentType, ByteBuffer... byteBuffers)
    • ByteBufferRequestContent

      public ByteBufferRequestContent(String contentType, Collection<ByteBuffer> byteBuffers)
  • Method Details

    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface Request.Content
      Returns:
      the content type string such as "application/octet-stream" or "application/json;charset=UTF8", or null if the Content-Type header must not be set