public final class HttpEncodingStreamingContent extends Objectimplements StreamingContent
Implementation is thread-safe only if the streaming content and HTTP encoding are thread-safe.
| Constructor and Description |
|---|
HttpEncodingStreamingContent(StreamingContent
|
| Modifier and Type | Method and Description |
|---|---|
StreamingContent |
getContent()
Returns the streaming content.
|
HttpEncoding |
getEncoding()
Returns the HTTP encoding.
|
void |
writeTo(OutputStream
Writes the byte content to the given output stream.
|
public HttpEncodingStreamingContent(StreamingContentcontent, HttpEncoding encoding)
content - streaming content
encoding - HTTP encoding
public void writeTo(OutputStreamout) throws IOException
StreamingContent
Implementations must not close the output stream, and instead should flush the output stream. Some callers may assume that the the output stream has not been closed, and will fail to work if it has been closed.
writeTo in interface
StreamingContent
out - output stream
IOException
public StreamingContentgetContent()
public HttpEncodinggetEncoding()