Package io.keyko.nevermined.models
Class HttpResponse
- java.lang.Object
-
- io.keyko.nevermined.models.HttpResponse
-
public class HttpResponse extends Object
-
-
Field Summary
Fields Modifier and Type Field Description private Stringbodyprivate Stringcharsetprivate longcontentLengthprivate org.apache.commons.httpclient.Header[]headersprivate intstatusCode
-
Constructor Summary
Constructors Constructor Description HttpResponse(int statusCode, String body, String charset, long contentLength)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBody()Get the bodyStringgetCharset()Get the charsetlonggetContentLength()Get content lengthorg.apache.commons.httpclient.HeadergetHeader(String name)Get HTTP response header giving a header nameorg.apache.commons.httpclient.Header[]getHeaders()Get HTTP response headersintgetStatusCode()Ge the http status codevoidsetBody(String body)Set the bodyvoidsetCharset(String charset)Set the charsetvoidsetContentLength(long contentLength)Set content lengthvoidsetHeaders(org.apache.commons.httpclient.Header[] headers)Set HTTP response headersvoidsetStatusCode(int statusCode)Set the http status codeStringtoString()Get the string representation of the object
-
-
-
Method Detail
-
getStatusCode
public int getStatusCode()
Ge the http status code- Returns:
- status code
-
setStatusCode
public void setStatusCode(int statusCode)
Set the http status code- Parameters:
statusCode- status code
-
getBody
public String getBody()
Get the body- Returns:
- string body
-
setBody
public void setBody(String body)
Set the body- Parameters:
body- string
-
getCharset
public String getCharset()
Get the charset- Returns:
- charset
-
setCharset
public void setCharset(String charset)
Set the charset- Parameters:
charset- charset
-
getContentLength
public long getContentLength()
Get content length- Returns:
- content length
-
setContentLength
public void setContentLength(long contentLength)
Set content length- Parameters:
contentLength- content length
-
getHeaders
public org.apache.commons.httpclient.Header[] getHeaders()
Get HTTP response headers- Returns:
- headers
-
getHeader
public org.apache.commons.httpclient.Header getHeader(String name)
Get HTTP response header giving a header name- Parameters:
name- name of the header- Returns:
- header
-
setHeaders
public void setHeaders(org.apache.commons.httpclient.Header[] headers)
Set HTTP response headers- Parameters:
headers- headers
-
-