net.oauth.client
Class URLConnectionResponse
java.lang.Object
net.oauth.http.HttpMessage
net.oauth.http.HttpResponseMessage
net.oauth.client.URLConnectionResponse
public class URLConnectionResponse
- extends net.oauth.http.HttpResponseMessage
The response part of a URLConnection, encapsulated as an HttpMessage.
- Author:
- John Kristian
| 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 |
|
Constructor Summary |
URLConnectionResponse(net.oauth.http.HttpMessage request,
String requestHeaders,
byte[] requestExcerpt,
URLConnection connection)
Construct an OAuthMessage from the HTTP response, including parameters
from OAuth WWW-Authenticate headers and the body. |
| Methods inherited from class net.oauth.http.HttpMessage |
getBody, getContentCharset, getHeader, newRequest, removeHeaders |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
requestHeaders
private final String requestHeaders
requestExcerpt
private final byte[] requestExcerpt
requestEncoding
private final String requestEncoding
connection
private final URLConnection connection
URLConnectionResponse
public URLConnectionResponse(net.oauth.http.HttpMessage request,
String requestHeaders,
byte[] requestExcerpt,
URLConnection connection)
throws IOException
- Construct an OAuthMessage from the HTTP response, including parameters
from OAuth WWW-Authenticate headers and the body. The header parameters
come first, followed by the ones from the response body.
- Throws:
IOException
getStatusCode
public int getStatusCode()
throws IOException
- Specified by:
getStatusCode in class net.oauth.http.HttpResponseMessage
- Throws:
IOException
openBody
public InputStream openBody()
- Overrides:
openBody in class net.oauth.http.HttpMessage
getHeaders
private List<Map.Entry<String,String>> getHeaders()
dump
public void dump(Map<String,Object> into)
throws IOException
- Return a complete description of the HTTP exchange.
- Overrides:
dump in class net.oauth.http.HttpResponseMessage
- Throws:
IOException
Copyright © 2016. All rights reserved.