public class URLConnectionResponse extends HttpResponseMessage
Modifier and Type | Field and Description |
---|---|
private java.net.URLConnection |
connection |
private java.lang.String |
requestEncoding |
private byte[] |
requestExcerpt |
private java.lang.String |
requestHeaders |
EOL, LOCATION, STATUS_CODE, STATUS_OK
ACCEPT_ENCODING, body, CONTENT_ENCODING, CONTENT_LENGTH, CONTENT_TYPE, DEFAULT_CHARSET, headers, method, REQUEST, RESPONSE, url
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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) |
private java.util.List<java.util.Map.Entry<java.lang.String,java.lang.String>> |
getHeaders() |
int |
getStatusCode() |
java.io.InputStream |
openBody() |
getBody, getContentCharset, getHeader, newRequest, removeHeaders
private final java.lang.String requestHeaders
private final byte[] requestExcerpt
private final java.lang.String requestEncoding
private final java.net.URLConnection connection
public URLConnectionResponse(HttpMessage request, java.lang.String requestHeaders, byte[] requestExcerpt, java.net.URLConnection connection) throws java.io.IOException
java.io.IOException
public int getStatusCode() throws java.io.IOException
getStatusCode
in class HttpResponseMessage
java.io.IOException
public java.io.InputStream openBody()
openBody
in class HttpMessage
protected java.lang.String getHeaderField(java.net.URLConnection connection, int index)
protected java.lang.String getHeaderFieldKey(java.net.URLConnection connection, int index)
private java.util.List<java.util.Map.Entry<java.lang.String,java.lang.String>> getHeaders()
public void dump(java.util.Map<java.lang.String,java.lang.Object> into) throws java.io.IOException
dump
in class HttpResponseMessage
java.io.IOException