Class TestHttpResponse
- java.lang.Object
-
- org.robolectric.shadows.httpclient.HttpResponseStub
-
- org.robolectric.shadows.httpclient.TestHttpResponse
-
- All Implemented Interfaces:
org.apache.http.HttpMessage
,org.apache.http.HttpResponse
public class TestHttpResponse extends HttpResponseStub
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
TestHttpResponse.TestHttpEntity
class
TestHttpResponse.TestStatusLine
-
Constructor Summary
Constructors Constructor Description TestHttpResponse()
TestHttpResponse(int statusCode, byte[] responseBody, org.apache.http.Header... headers)
TestHttpResponse(int statusCode, String responseBody)
TestHttpResponse(int statusCode, String responseBody, org.apache.http.Header... headers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHeader(org.apache.http.Header header)
boolean
containsHeader(String s)
boolean
entityContentStreamsHaveBeenClosed()
org.apache.http.Header[]
getAllHeaders()
org.apache.http.HttpEntity
getEntity()
org.apache.http.Header
getFirstHeader(String s)
org.apache.http.Header[]
getHeaders(String s)
org.apache.http.Header
getLastHeader(String s)
HttpParams
getParams()
org.apache.http.StatusLine
getStatusLine()
org.apache.http.HeaderIterator
headerIterator()
org.apache.http.HeaderIterator
headerIterator(String s)
void
setHeader(org.apache.http.Header newHeader)
void
setParams(HttpParams httpParams)
protected void
setResponseBody(String responseBody)
-
Methods inherited from class org.robolectric.shadows.httpclient.HttpResponseStub
addHeader, getLocale, getProtocolVersion, removeHeader, removeHeaders, setEntity, setHeader, setHeaders, setLocale, setReasonPhrase, setStatusCode, setStatusLine, setStatusLine, setStatusLine
-
-
-
-
Constructor Detail
-
TestHttpResponse
public TestHttpResponse()
-
TestHttpResponse
public TestHttpResponse(int statusCode, String responseBody)
-
TestHttpResponse
public TestHttpResponse(int statusCode, String responseBody, org.apache.http.Header... headers)
-
TestHttpResponse
public TestHttpResponse(int statusCode, byte[] responseBody, org.apache.http.Header... headers)
-
-
Method Detail
-
setResponseBody
protected void setResponseBody(String responseBody)
-
getStatusLine
public org.apache.http.StatusLine getStatusLine()
- Specified by:
getStatusLine
in interfaceorg.apache.http.HttpResponse
- Overrides:
getStatusLine
in classHttpResponseStub
-
getEntity
public org.apache.http.HttpEntity getEntity()
- Specified by:
getEntity
in interfaceorg.apache.http.HttpResponse
- Overrides:
getEntity
in classHttpResponseStub
-
getAllHeaders
public org.apache.http.Header[] getAllHeaders()
- Specified by:
getAllHeaders
in interfaceorg.apache.http.HttpMessage
- Overrides:
getAllHeaders
in classHttpResponseStub
-
getFirstHeader
public org.apache.http.Header getFirstHeader(String s)
- Specified by:
getFirstHeader
in interfaceorg.apache.http.HttpMessage
- Overrides:
getFirstHeader
in classHttpResponseStub
-
getLastHeader
public org.apache.http.Header getLastHeader(String s)
- Specified by:
getLastHeader
in interfaceorg.apache.http.HttpMessage
- Overrides:
getLastHeader
in classHttpResponseStub
-
getHeaders
public org.apache.http.Header[] getHeaders(String s)
- Specified by:
getHeaders
in interfaceorg.apache.http.HttpMessage
- Overrides:
getHeaders
in classHttpResponseStub
-
addHeader
public void addHeader(org.apache.http.Header header)
- Specified by:
addHeader
in interfaceorg.apache.http.HttpMessage
- Overrides:
addHeader
in classHttpResponseStub
-
setHeader
public void setHeader(org.apache.http.Header newHeader)
- Specified by:
setHeader
in interfaceorg.apache.http.HttpMessage
- Overrides:
setHeader
in classHttpResponseStub
-
headerIterator
public org.apache.http.HeaderIterator headerIterator()
- Specified by:
headerIterator
in interfaceorg.apache.http.HttpMessage
- Overrides:
headerIterator
in classHttpResponseStub
-
headerIterator
public org.apache.http.HeaderIterator headerIterator(String s)
- Specified by:
headerIterator
in interfaceorg.apache.http.HttpMessage
- Overrides:
headerIterator
in classHttpResponseStub
-
containsHeader
public boolean containsHeader(String s)
- Specified by:
containsHeader
in interfaceorg.apache.http.HttpMessage
- Overrides:
containsHeader
in classHttpResponseStub
-
getParams
public HttpParams getParams()
- Specified by:
getParams
in interfaceorg.apache.http.HttpMessage
- Overrides:
getParams
in classHttpResponseStub
-
setParams
public void setParams(HttpParams httpParams)
- Specified by:
setParams
in interfaceorg.apache.http.HttpMessage
- Overrides:
setParams
in classHttpResponseStub
-
entityContentStreamsHaveBeenClosed
public boolean entityContentStreamsHaveBeenClosed()
-
-