Class HttpResponseStub
java.lang.Object
org.robolectric.shadows.httpclient.HttpResponseStub
- All Implemented Interfaces:
org.apache.http.HttpMessage
,org.apache.http.HttpResponse
- Direct Known Subclasses:
TestHttpResponse
public class HttpResponseStub extends Object implements org.apache.http.HttpResponse
-
Constructor Summary
Constructors Constructor Description HttpResponseStub()
-
Method Summary
Modifier and Type Method Description void
addHeader(String s, String s1)
void
addHeader(org.apache.http.Header header)
boolean
containsHeader(String s)
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)
Locale
getLocale()
HttpParams
getParams()
org.apache.http.ProtocolVersion
getProtocolVersion()
org.apache.http.StatusLine
getStatusLine()
org.apache.http.HeaderIterator
headerIterator()
org.apache.http.HeaderIterator
headerIterator(String s)
void
removeHeader(org.apache.http.Header header)
void
removeHeaders(String s)
void
setEntity(org.apache.http.HttpEntity httpEntity)
void
setHeader(String s, String s1)
void
setHeader(org.apache.http.Header header)
void
setHeaders(org.apache.http.Header[] headers)
void
setLocale(Locale locale)
void
setParams(HttpParams httpParams)
void
setReasonPhrase(String s)
void
setStatusCode(int i)
void
setStatusLine(org.apache.http.ProtocolVersion protocolVersion, int i)
void
setStatusLine(org.apache.http.ProtocolVersion protocolVersion, int i, String s)
void
setStatusLine(org.apache.http.StatusLine statusLine)
-
Constructor Details
-
HttpResponseStub
public HttpResponseStub()
-
-
Method Details
-
getStatusLine
public org.apache.http.StatusLine getStatusLine()- Specified by:
getStatusLine
in interfaceorg.apache.http.HttpResponse
-
setStatusLine
public void setStatusLine(org.apache.http.StatusLine statusLine)- Specified by:
setStatusLine
in interfaceorg.apache.http.HttpResponse
-
setStatusLine
public void setStatusLine(org.apache.http.ProtocolVersion protocolVersion, int i)- Specified by:
setStatusLine
in interfaceorg.apache.http.HttpResponse
-
setStatusLine
- Specified by:
setStatusLine
in interfaceorg.apache.http.HttpResponse
-
setStatusCode
- Specified by:
setStatusCode
in interfaceorg.apache.http.HttpResponse
- Throws:
IllegalStateException
-
setReasonPhrase
- Specified by:
setReasonPhrase
in interfaceorg.apache.http.HttpResponse
- Throws:
IllegalStateException
-
getEntity
public org.apache.http.HttpEntity getEntity()- Specified by:
getEntity
in interfaceorg.apache.http.HttpResponse
-
setEntity
public void setEntity(org.apache.http.HttpEntity httpEntity)- Specified by:
setEntity
in interfaceorg.apache.http.HttpResponse
-
getLocale
- Specified by:
getLocale
in interfaceorg.apache.http.HttpResponse
-
setLocale
- Specified by:
setLocale
in interfaceorg.apache.http.HttpResponse
-
getProtocolVersion
public org.apache.http.ProtocolVersion getProtocolVersion()- Specified by:
getProtocolVersion
in interfaceorg.apache.http.HttpMessage
-
containsHeader
- Specified by:
containsHeader
in interfaceorg.apache.http.HttpMessage
-
getHeaders
- Specified by:
getHeaders
in interfaceorg.apache.http.HttpMessage
-
getFirstHeader
- Specified by:
getFirstHeader
in interfaceorg.apache.http.HttpMessage
-
getLastHeader
- Specified by:
getLastHeader
in interfaceorg.apache.http.HttpMessage
-
getAllHeaders
public org.apache.http.Header[] getAllHeaders()- Specified by:
getAllHeaders
in interfaceorg.apache.http.HttpMessage
-
addHeader
public void addHeader(org.apache.http.Header header)- Specified by:
addHeader
in interfaceorg.apache.http.HttpMessage
-
addHeader
- Specified by:
addHeader
in interfaceorg.apache.http.HttpMessage
-
setHeader
public void setHeader(org.apache.http.Header header)- Specified by:
setHeader
in interfaceorg.apache.http.HttpMessage
-
setHeader
- Specified by:
setHeader
in interfaceorg.apache.http.HttpMessage
-
setHeaders
public void setHeaders(org.apache.http.Header[] headers)- Specified by:
setHeaders
in interfaceorg.apache.http.HttpMessage
-
removeHeader
public void removeHeader(org.apache.http.Header header)- Specified by:
removeHeader
in interfaceorg.apache.http.HttpMessage
-
removeHeaders
- Specified by:
removeHeaders
in interfaceorg.apache.http.HttpMessage
-
headerIterator
public org.apache.http.HeaderIterator headerIterator()- Specified by:
headerIterator
in interfaceorg.apache.http.HttpMessage
-
headerIterator
- Specified by:
headerIterator
in interfaceorg.apache.http.HttpMessage
-
getParams
- Specified by:
getParams
in interfaceorg.apache.http.HttpMessage
-
setParams
- Specified by:
setParams
in interfaceorg.apache.http.HttpMessage
-