Package net.oauth.http
Class HttpMessageDecoder
- java.lang.Object
-
- net.oauth.http.HttpMessage
-
- net.oauth.http.HttpResponseMessage
-
- net.oauth.http.HttpMessageDecoder
-
public class HttpMessageDecoder extends HttpResponseMessage
A decorator that handles Content-Encoding.
-
-
Field Summary
Fields Modifier and Type Field Description static StringACCEPTEDstatic StringDEFLATEstatic StringGZIP-
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpResponseMessagedecode(HttpResponseMessage message)Decode the given message if necessary and possible.voiddump(Map<String,Object> into)Put a description of this message and its origins into the given Map.intgetStatusCode()-
Methods inherited from class net.oauth.http.HttpMessage
getBody, getContentCharset, getHeader, newRequest, openBody, removeHeaders
-
-
-
-
Field Detail
-
GZIP
public static final String GZIP
- See Also:
- Constant Field Values
-
DEFLATE
public static final String DEFLATE
- See Also:
- Constant Field Values
-
ACCEPTED
public static final String ACCEPTED
- See Also:
- Constant Field Values
-
-
Method Detail
-
decode
public static HttpResponseMessage decode(HttpResponseMessage message) throws 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:
IOException
-
dump
public void dump(Map<String,Object> into) throws IOException
Description copied from class:HttpMessagePut a description of this message and its origins into the given Map.- Overrides:
dumpin classHttpResponseMessage- Throws:
IOException
-
getStatusCode
public int getStatusCode() throws IOException- Specified by:
getStatusCodein classHttpResponseMessage- Throws:
IOException
-
-