|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Encoding
An interface representing an arbitrary HTTP encoding.
An implementation of this interface can be specified on the
client API
for request encoding, or on the
server API
for handling encoded requests.
An implementation essentially exposes the ability to wrap an
OutputStream
and an InputStream
. These
are expected to encode and decode data written and read on those streams
respectively.
GZipEncoding
,
DeflaterEncoding
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. |
Method Detail |
---|
java.lang.String getName()
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.
HttpConstants.ContentEncoding
java.io.InputStream getDecoder(java.io.InputStream in) throws java.io.IOException
in
- The stream from which encoded data may be read.
java.io.IOException
java.io.OutputStream getEncoder(java.io.OutputStream out) throws java.io.IOException
The returned stream will be closed before the encoded data is marshalled.
out
- The stream to which encoded data should ultimately be
written.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |