@Priority(value=4000) public class GZipEncoder extends ContentEncoder
Content-Encoding header
value equals to gzip
or x-gzip
.Constructor and Description |
---|
GZipEncoder()
Initialize GZipEncoder.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
decode(String contentEncoding,
InputStream encodedStream)
Implementations of this method should take the encoded stream, wrap it and return a stream that can be used
to read the decoded entity.
|
OutputStream |
encode(String contentEncoding,
OutputStream entityStream)
Implementations of this method should take the entity stream, wrap it and return a stream that is encoded
using the specified encoding.
|
aroundReadFrom, aroundWriteTo, getSupportedEncodings
public InputStream decode(String contentEncoding, InputStream encodedStream) throws IOException
ContentEncoder
decode
in class ContentEncoder
contentEncoding
- Encoding to be used to decode the stream - guaranteed to be one of the supported encoding
values.encodedStream
- Encoded input stream.IOException
- if an IO error arises.public OutputStream encode(String contentEncoding, OutputStream entityStream) throws IOException
ContentEncoder
encode
in class ContentEncoder
contentEncoding
- Encoding to be used to encode the entity - guaranteed to be one of the supported encoding
values.entityStream
- Entity stream to be encoded.IOException
- if an IO error arises.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.