com.flat502.rox.encoding
Class GZipEncoding

java.lang.Object
  extended by com.flat502.rox.encoding.GZipEncoding
All Implemented Interfaces:
Encoding

public class GZipEncoding
extends java.lang.Object
implements Encoding


Constructor Summary
GZipEncoding()
           
 
Method Summary
 java.io.InputStream getDecoder(java.io.InputStream in)
          Implementations should return a stream ready for decoding.
 java.io.OutputStream getEncoder(java.io.OutputStream out)
          Implementations should return a stream ready for encoding.
 java.lang.String getName()
          Implementations should return the canonical name of this encoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GZipEncoding

public GZipEncoding()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Encoding
Implementations should return the canonical name of this encoding.

This name is sent as the value in the Content-Encoding and Accept-Encoding HTTP headers where required, and is used when locating an encoding handler on the server side.

Specified by:
getName in interface Encoding
Returns:
The canonical name of this encoding.
See Also:
HttpConstants.ContentEncoding

getDecoder

public java.io.InputStream getDecoder(java.io.InputStream in)
                               throws java.io.IOException
Description copied from interface: Encoding
Implementations should return a stream ready for decoding.

Specified by:
getDecoder in interface Encoding
Parameters:
in - The stream from which encoded data may be read.
Returns:
A decoding stream.
Throws:
java.io.IOException

getEncoder

public java.io.OutputStream getEncoder(java.io.OutputStream out)
                                throws java.io.IOException
Description copied from interface: Encoding
Implementations should return a stream ready for encoding.

The returned stream will be closed before the encoded data is marshalled.

Specified by:
getEncoder in interface Encoding
Parameters:
out - The stream to which encoded data should ultimately be written.
Returns:
An encoding stream.
Throws:
java.io.IOException