Package org.apache.juneau.encoders
Class Encoder
java.lang.Object
org.apache.juneau.encoders.Encoder
- Direct Known Subclasses:
- EncoderSet.Inherit,- EncoderSet.NoInherit,- GzipEncoder,- IdentityEncoder
Used for enabling decompression on requests and compression on responses, such as support for GZIP compression.
 
Description
Used to wrap input and output streams within compression/decompression streams.
 Encoders are registered with 
Notes:
- This class is thread safe and reusable.
See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract String[]Returns the codings inContent-Encoding andAccept-Encoding headers that this encoder handles (e.g.abstract InputStreamConverts the specified compressed input stream into an uncompressed stream.abstract OutputStreamConverts the specified uncompressed output stream into an uncompressed stream.
- 
Constructor Details- 
Encoderpublic Encoder()
 
- 
- 
Method Details- 
getInputStreamConverts the specified compressed input stream into an uncompressed stream.- Parameters:
- is- The compressed stream.
- Returns:
- The uncompressed stream.
- Throws:
- IOException- If any errors occur, such as on a stream that's not a valid GZIP input stream.
 
- 
getOutputStreamConverts the specified uncompressed output stream into an uncompressed stream.- Parameters:
- os- The uncompressed stream.
- Returns:
- The compressed stream stream.
- Throws:
- IOException- If any errors occur.
 
- 
getCodingsReturns the codings inContent-Encoding andAccept-Encoding headers that this encoder handles (e.g."gzip" ).- Returns:
- The codings that this encoder handles.
 
 
-