Top Description Fields Constructors Methods
org.eclipse.jetty.client

public Class InputStreamRequestContent

extends InputStreamContentSource
implements Content
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.client.Request.Content, org.eclipse.jetty.io.Content.Source
Imports
java.io.InputStream, org.eclipse.jetty.io.ByteBufferPool, org.eclipse.jetty.io.content.InputStreamContentSource

A Request.Content that produces content from an InputStream.

The input stream is read once and therefore fully consumed.

It is possible to specify, at the constructor, a buffer size used to read content from the stream, by default 4096 bytes.

The InputStream passed to the constructor is by default closed when is it fully consumed.

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public
public
InputStreamRequestContent(InputStream stream, int bufferSize)

public
InputStreamRequestContent(String contentType, InputStream stream, int bufferSize)

public
public

Method Summary

Modifier and TypeMethod and Description
public String
Inherited from org.eclipse.jetty.io.content.InputStreamContentSource:
demandfailfillBufferFromInputStreamgetBufferSizereadsetBufferSize

Field Detail

contentTypeback to summary
private final String contentType

Constructor Detail

InputStreamRequestContentback to summary
public InputStreamRequestContent(InputStream stream)
InputStreamRequestContentback to summary
public InputStreamRequestContent(InputStream stream, int bufferSize)
InputStreamRequestContentback to summary
public InputStreamRequestContent(String contentType, InputStream stream, int bufferSize)
InputStreamRequestContentback to summary
public InputStreamRequestContent(String contentType, InputStream stream)
InputStreamRequestContentback to summary
public InputStreamRequestContent(String contentType, InputStream stream, ByteBufferPool bufferPool)

Method Detail

getContentTypeback to summary
public String getContentType()

Overrides default org.eclipse.jetty.client.Request.Content.getContentType.

Returns:String

Doc from org.eclipse.jetty.client.Request.Content.getContentType.

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

Annotations
@Override