net.oauth.http
Class HttpMessageDecoder

java.lang.Object
  extended by net.oauth.http.HttpMessage
      extended by net.oauth.http.HttpResponseMessage
          extended by net.oauth.http.HttpMessageDecoder

public class HttpMessageDecoder
extends HttpResponseMessage

A decorator that handles Content-Encoding.


Field Summary
static java.lang.String ACCEPTED
           
static java.lang.String DEFLATE
           
static java.lang.String GZIP
           
 
Fields inherited from class net.oauth.http.HttpResponseMessage
EOL, LOCATION, STATUS_CODE, STATUS_OK
 
Fields inherited from class net.oauth.http.HttpMessage
ACCEPT_ENCODING, body, CONTENT_ENCODING, CONTENT_LENGTH, CONTENT_TYPE, DEFAULT_CHARSET, headers, method, REQUEST, RESPONSE, url
 
Method Summary
static HttpResponseMessage decode(HttpResponseMessage message)
          Decode the given message if necessary and possible.
 void dump(java.util.Map<java.lang.String,java.lang.Object> into)
          Put a description of this message and its origins into the given Map.
 int getStatusCode()
           
 
Methods inherited from class net.oauth.http.HttpMessage
getBody, getContentCharset, getHeader, newRequest, openBody, removeHeaders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GZIP

public static final java.lang.String GZIP
See Also:
Constant Field Values

DEFLATE

public static final java.lang.String DEFLATE
See Also:
Constant Field Values

ACCEPTED

public static final java.lang.String ACCEPTED
See Also:
Constant Field Values
Method Detail

decode

public static HttpResponseMessage decode(HttpResponseMessage message)
                                  throws java.io.IOException
Decode the given message if necessary and possible.

Returns:
a decorator that decodes the body of the given message; or the given message if this class can't decode it.
Throws:
java.io.IOException

dump

public void dump(java.util.Map<java.lang.String,java.lang.Object> into)
          throws java.io.IOException
Description copied from class: HttpMessage
Put a description of this message and its origins into the given Map.

Overrides:
dump in class HttpResponseMessage
Throws:
java.io.IOException

getStatusCode

public int getStatusCode()
                  throws java.io.IOException
Specified by:
getStatusCode in class HttpResponseMessage
Throws:
java.io.IOException


Copyright © 2009. All Rights Reserved.