public class HttpResponseImpl extends Object implements HttpResponse
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
getContentType() |
<T> T |
getEntity(Class<T> returnType)
Gets the entity and Maps any errors which will result in a
ResponseException
|
<T> T |
getEntity(Class<T> returnType,
ExecutionOptions<T> options)
Gets the entity and Maps any errors which will result in a
ResponseException
|
InputStream |
getInputStream() |
int |
getStatus()
Gets the status from the previous Request
|
String |
getStatusMessage() |
String |
header(String name)
Returns a Header value from the specified name key
|
Map<String,String> |
headers() |
<T> T |
readEntity(Class<T> typeToReadAs) |
static HttpResponseImpl |
wrap(Map<String,List<String>> headers,
int responseCode,
String responseMessage,
byte[] data)
Wrap the given Response
|
public static HttpResponseImpl wrap(Map<String,List<String>> headers, int responseCode, String responseMessage, byte[] data)
headers - responseCode - responseMessage - public <T> T getEntity(Class<T> returnType)
getEntity in interface HttpResponseT - the generic typereturnType - the return typepublic <T> T getEntity(Class<T> returnType, ExecutionOptions<T> options)
getEntity in interface HttpResponseT - the generic typereturnType - the return typeoptions - the execution optionspublic int getStatus()
getStatus in interface HttpResponsepublic String getStatusMessage()
getStatusMessage in interface HttpResponsepublic InputStream getInputStream()
getInputStream in interface HttpResponsepublic String header(String name)
header in interface HttpResponsename - the name of the header to query forpublic Map<String,String> headers()
headers in interface HttpResponsepublic <T> T readEntity(Class<T> typeToReadAs)
readEntity in interface HttpResponsepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic String getContentType()
getContentType in interface HttpResponseCopyright © 2015. All Rights Reserved.