Package org.webharvest.runtime.web
Class HttpResponseWrapper
- java.lang.Object
-
- org.webharvest.runtime.web.HttpResponseWrapper
-
public class HttpResponseWrapper extends Object
Class defines http server response.
-
-
Constructor Summary
Constructors Constructor Description HttpResponseWrapper(org.apache.commons.httpclient.HttpMethodBase method)
Constructor - defines response result based on specified HttpMethodBase instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
byte[]
getBody()
Deprecated.Left only for backward compatibility.InputStream
getBodyAsInputStream()
String
getCharset()
long
getContentLength()
KeyValuePair<String>[]
getHeaders()
String
getMimeType()
int
getStatusCode()
String
getStatusText()
byte[]
readBodyAsArray()
-
-
-
Method Detail
-
getContentLength
public long getContentLength()
-
getCharset
public String getCharset()
-
getMimeType
public String getMimeType()
-
getBody
@Deprecated public byte[] getBody()
Deprecated.Left only for backward compatibility. UsereadBodyAsArray()
orgetBodyAsInputStream()
- Returns:
- byte array
-
readBodyAsArray
public byte[] readBodyAsArray()
-
getBodyAsInputStream
public InputStream getBodyAsInputStream()
-
close
public void close()
-
getHeaders
public KeyValuePair<String>[] getHeaders()
-
getStatusCode
public int getStatusCode()
-
getStatusText
public String getStatusText()
-
-