Class Response
java.lang.Object
org.apache.hadoop.hbase.rest.client.Response
The HTTP result code, response headers, and body of an HTTP response.
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionResponse(int code) ConstructorResponse(int code, org.apache.http.Header[] headers) ConstructorResponse(int code, org.apache.http.Header[] headers, byte[] body) ConstructorResponse(int code, org.apache.http.Header[] headers, org.apache.http.HttpResponse resp, InputStream in) Constructor. - 
Method Summary
Modifier and TypeMethodDescriptionbyte[]getBody()Returns the HTTP response bodyintgetCode()Returns the HTTP response codeorg.apache.http.Header[]Returns the HTTP response headersReturns the value of the Location headerGets the input stream instance.booleanhasBody()Returns true if a response body was sentvoidsetBody(byte[] body) voidsetCode(int code) voidsetHeaders(org.apache.http.Header[] headers)  
- 
Field Details
- 
LOG
 - 
code
 - 
headers
 - 
body
 - 
resp
 - 
stream
 
 - 
 - 
Constructor Details
- 
Response
Constructor- Parameters:
 code- the HTTP response code
 - 
Response
Constructor- Parameters:
 code- the HTTP response codeheaders- the HTTP response headers
 - 
Response
Constructor- Parameters:
 code- the HTTP response codeheaders- the HTTP response headersbody- the response body, can be null
 - 
Response
public Response(int code, org.apache.http.Header[] headers, org.apache.http.HttpResponse resp, InputStream in) Constructor. Note: this is not thread-safe- Parameters:
 code- the HTTP response codeheaders- headers the HTTP response headersresp- the responsein- Inputstream if the response had one.
 
 - 
 - 
Method Details
- 
getCode
Returns the HTTP response code - 
getStream
Gets the input stream instance.- Returns:
 - an instance of InputStream class.
 
 - 
getHeaders
Returns the HTTP response headers - 
getHeader
 - 
getLocation
Returns the value of the Location header - 
hasBody
Returns true if a response body was sent - 
getBody
Returns the HTTP response body - 
setCode
- Parameters:
 code- the HTTP response code
 - 
setHeaders
- Parameters:
 headers- the HTTP response headers
 - 
setBody
- Parameters:
 body- the response body
 
 -