public abstract class Encoder extends Object
Encoders are registered with RestServlets
through the
Constructor and Description |
---|
Encoder() |
Modifier and Type | Method and Description |
---|---|
abstract String[] |
getCodings()
Returns the codings in
Content-Encoding and Accept-Encoding headers that this encoder
handles (e.g. |
abstract InputStream |
getInputStream(InputStream is)
Converts the specified compressed input stream into an uncompressed stream.
|
abstract OutputStream |
getOutputStream(OutputStream os)
Converts the specified uncompressed output stream into an uncompressed stream.
|
public Encoder()
public abstract InputStream getInputStream(InputStream is) throws IOException
is
- The compressed stream.IOException
- If any errors occur, such as on a stream that's not a valid GZIP input stream.public abstract OutputStream getOutputStream(OutputStream os) throws IOException
os
- The uncompressed stream.IOException
- If any errors occur.public abstract String[] getCodings()
Content-Encoding
and Accept-Encoding
headers that this encoder
handles (e.g. Copyright © 2018 Apache. All rights reserved.