WARNING: This class will be REMOVED in the next version.
@Deprecated public class HttpResponseDecorator extends Object implements HttpResponse
HttpResponseDecorator| Modifier and Type | Field and Description |
|---|---|
protected HttpResponse |
impl
Deprecated.
|
| Constructor and Description |
|---|
HttpResponseDecorator(HttpResponse r)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Deprecated.
Releases the underlying the HTTP connection when the response is streamed
|
byte[] |
getBody()
Deprecated.
The HTTP response body or null if isStreamed()
|
String |
getBodyAsString()
Deprecated.
|
String |
getBucket()
Deprecated.
The target object's bucket
|
Map<String,String> |
getHttpHeaders()
Deprecated.
The HTTP response headers.
|
org.apache.http.client.methods.HttpRequestBase |
getHttpMethod()
Deprecated.
The actual
HttpMethod used to make the HTTP request. |
org.apache.http.HttpResponse |
getHttpResponse()
Deprecated.
|
String |
getKey()
Deprecated.
The target object's key or null if bucket is target
|
int |
getStatusCode()
Deprecated.
Resulting status code from the HTTP request.
|
InputStream |
getStream()
Deprecated.
The HTTP response body as an input stream if isStreamed(); null otherwise
|
boolean |
isError()
Deprecated.
Whether the HTTP request returned a 4xx or 5xx response
|
boolean |
isStreamed()
Deprecated.
Whether the response body is available as an input stream
|
boolean |
isSuccess()
Deprecated.
Whether the HTTP response is considered a success.
|
protected HttpResponse impl
public HttpResponseDecorator(HttpResponse r)
public String getBucket()
HttpResponsegetBucket in interface HttpResponsepublic String getKey()
HttpResponsegetKey in interface HttpResponsepublic byte[] getBody()
HttpResponsegetBody in interface HttpResponsepublic String getBodyAsString()
getBodyAsString in interface HttpResponsepublic InputStream getStream()
HttpResponsegetStream in interface HttpResponsepublic boolean isStreamed()
HttpResponseisStreamed in interface HttpResponsepublic Map<String,String> getHttpHeaders()
HttpResponsegetHttpHeaders in interface HttpResponsepublic org.apache.http.client.methods.HttpRequestBase getHttpMethod()
HttpResponseHttpMethod used to make the HTTP request. Most of the
data here can be retrieved more simply using methods in this class. Also,
note that the connection will already be closed, so calling
getHttpMethod().getResponseBodyAsStream() will return null.getHttpMethod in interface HttpResponsepublic int getStatusCode()
HttpResponsegetStatusCode in interface HttpResponsepublic boolean isError()
HttpResponseisError in interface HttpResponsepublic boolean isSuccess()
HttpResponseisSuccess in interface HttpResponsepublic void close()
HttpResponseclose in interface HttpResponsepublic org.apache.http.HttpResponse getHttpResponse()
getHttpResponse in interface HttpResponseCopyright © 2014. All Rights Reserved.