Class InputStreamRequestContent
java.lang.Object
org.eclipse.jetty.io.content.InputStreamContentSource
org.eclipse.jetty.client.InputStreamRequestContent
- All Implemented Interfaces:
Request.Content, Content.Source
- Direct Known Subclasses:
ProxyServlet.ProxyInputStreamRequestContent, ProxyServlet.ProxyInputStreamRequestContent, ProxyServlet.ProxyInputStreamRequestContent
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Content.Source
Content.Source.Factory -
Constructor Summary
ConstructorsConstructorDescriptionInputStreamRequestContent(InputStream stream) InputStreamRequestContent(InputStream stream, int bufferSize) InputStreamRequestContent(String contentType, InputStream stream) InputStreamRequestContent(String contentType, InputStream stream, int bufferSize) InputStreamRequestContent(String contentType, InputStream stream, ByteBufferPool bufferPool) -
Method Summary
Methods inherited from class InputStreamContentSource
demand, fail, fillBufferFromInputStream, getBufferSize, isUseDirectByteBuffers, read, setBufferSize, setUseDirectByteBuffers
-
Constructor Details
-
InputStreamRequestContent
-
InputStreamRequestContent
-
InputStreamRequestContent
-
InputStreamRequestContent
-
InputStreamRequestContent
-
-
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()
-