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 SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionResponse(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 SummaryModifier 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- 
ResponseConstructor- Parameters:
- code- the HTTP response code
 
- 
ResponseConstructor- Parameters:
- code- the HTTP response code
- headers- the HTTP response headers
 
- 
ResponseConstructor- Parameters:
- code- the HTTP response code
- headers- the HTTP response headers
- body- the response body, can be null
 
- 
Responsepublic 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 code
- headers- headers the HTTP response headers
- resp- the response
- in- Inputstream if the response had one.
 
 
- 
- 
Method Details- 
getCodeReturns the HTTP response code
- 
getStreamGets the input stream instance.- Returns:
- an instance of InputStream class.
 
- 
getHeadersReturns the HTTP response headers
- 
getHeader
- 
getLocationReturns the value of the Location header
- 
hasBodyReturns true if a response body was sent
- 
getBodyReturns the HTTP response body
- 
setCode- Parameters:
- code- the HTTP response code
 
- 
setHeaders- Parameters:
- headers- the HTTP response headers
 
- 
setBody- Parameters:
- body- the response body
 
 
-