public interface ContentEncoding
InputStream and encode data to an OutputStream.
Encodings are specified in HTTP headers such as content-encoding, transfer-encoding,
accept-encoding.
Encoding handlers should be registered in the HttpServer in order to use them.
| Modifier and Type | Method and Description |
|---|---|
String |
getId()
Returns the name of the supported encoding.
|
InputStream |
open(InputStream original)
|
OutputStream |
open(OutputStream original)
|
String getId()
String in lower case format.InputStream open(InputStream original) throws IOException
original - the InputStream to read the encoded data.InputStream to read the decoded data.IOException - if any I/O error occurs.OutputStream open(OutputStream original) throws IOException
original OutputStream with a special OutputStream which performs the
encoding. Returns an OutputStream to encode the data from the original OutputStream.original - the output stream to wrap.OutputStream to encode the data.IOException - if any I/O error occurs.