public final class HttpEncodingStreamingContent implements StreamingContentStreaming content based on an HTTP encoding.
Implementation is thread-safe only if the streaming content and HTTP encoding are thread-safe.
Implements
StreamingContentConstructors
HttpEncodingStreamingContent(StreamingContent content, HttpEncoding encoding)
public HttpEncodingStreamingContent(StreamingContent content, HttpEncoding encoding)| Name | Description |
| content | StreamingContentstreaming content |
| encoding | HttpEncodingHTTP encoding |
Methods
getContent()
public StreamingContent getContent()Returns the streaming content.
| Type | Description |
| StreamingContent |
getEncoding()
public HttpEncoding getEncoding()Returns the HTTP encoding.
| Type | Description |
| HttpEncoding |
writeTo(OutputStream out)
public void writeTo(OutputStream out)Writes the byte content to the given output stream.
Implementations must not close the output stream, and instead should flush the output stream. Some callers may assume that the output stream has not been closed, and will fail to work if it has been closed.
| Name | Description |
| out | OutputStream |
| Type | Description |
| IOException |