net.oauth.client
Class URLConnectionResponse
java.lang.Object
net.oauth.http.HttpMessage
net.oauth.http.HttpResponseMessage
net.oauth.client.URLConnectionResponse
public class URLConnectionResponse
- extends HttpResponseMessage
The response part of a URLConnection, encapsulated as an HttpMessage.
- Author:
- John Kristian
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(HttpMessage request,
java.lang.String requestHeaders,
byte[] requestExcerpt,
java.net.URLConnection connection)
Construct an OAuthMessage from the HTTP response, including parameters
from OAuth WWW-Authenticate headers and the body. |
Method Summary |
void |
dump(java.util.Map<java.lang.String,java.lang.Object> into)
Return a complete description of the HTTP exchange. |
protected java.lang.String |
getHeaderField(java.net.URLConnection connection,
int index)
|
protected java.lang.String |
getHeaderFieldKey(java.net.URLConnection connection,
int index)
|
int |
getStatusCode()
|
java.io.InputStream |
openBody()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
URLConnectionResponse
public URLConnectionResponse(HttpMessage request,
java.lang.String requestHeaders,
byte[] requestExcerpt,
java.net.URLConnection connection)
throws java.io.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:
java.io.IOException
getStatusCode
public int getStatusCode()
throws java.io.IOException
- Specified by:
getStatusCode
in class HttpResponseMessage
- Throws:
java.io.IOException
openBody
public java.io.InputStream openBody()
- Overrides:
openBody
in class HttpMessage
getHeaderField
protected java.lang.String getHeaderField(java.net.URLConnection connection,
int index)
getHeaderFieldKey
protected java.lang.String getHeaderFieldKey(java.net.URLConnection connection,
int index)
dump
public void dump(java.util.Map<java.lang.String,java.lang.Object> into)
throws java.io.IOException
- Return a complete description of the HTTP exchange.
- Overrides:
dump
in class HttpResponseMessage
- Throws:
java.io.IOException
Copyright © 2009. All Rights Reserved.