Class HttpEncodingStreamingContent (1.44.2)

public final class HttpEncodingStreamingContent implements StreamingContent

Streaming content based on an HTTP encoding.

Implementation is thread-safe only if the streaming content and HTTP encoding are thread-safe.

Inheritance

java.lang.Object > HttpEncodingStreamingContent

Implements

StreamingContent

Constructors

HttpEncodingStreamingContent(StreamingContent content, HttpEncoding encoding)

public HttpEncodingStreamingContent(StreamingContent content, HttpEncoding encoding)
Parameters
Name Description
content StreamingContent

streaming content

encoding HttpEncoding

HTTP encoding

Methods

getContent()

public StreamingContent getContent()

Returns the streaming content.

Returns
Type Description
StreamingContent

getEncoding()

public HttpEncoding getEncoding()

Returns the HTTP encoding.

Returns
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.

Parameter
Name Description
out OutputStream
Exceptions
Type Description
IOException