Interface HttpEncoding (1.43.0)

public interface HttpEncoding

HTTP content encoding.

Implementations don't need to be thread-safe.

Methods

encode(StreamingContent content, OutputStream out)

public abstract void encode(StreamingContent content, OutputStream out)

Encodes the streaming content into the 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.

Parameters
NameDescription
contentStreamingContent

streaming content

outOutputStream

output stream

Exceptions
TypeDescription
IOException

getName()

public abstract String getName()

Returns the content encoding name (for example "gzip") or null for none.

Returns
TypeDescription
String