Class HttpEntityStub
- java.lang.Object
-
- org.robolectric.shadows.httpclient.HttpEntityStub
-
- All Implemented Interfaces:
org.apache.http.HttpEntity
- Direct Known Subclasses:
TestHttpResponse.TestHttpEntity
public class HttpEntityStub extends java.lang.Object implements org.apache.http.HttpEntity
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHttpEntityStub.ResponseRule
-
Constructor Summary
Constructors Constructor Description HttpEntityStub()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsumeContent()java.io.InputStreamgetContent()org.apache.http.HeadergetContentEncoding()longgetContentLength()org.apache.http.HeadergetContentType()booleanisChunked()booleanisRepeatable()booleanisStreaming()voidwriteTo(java.io.OutputStream outputStream)
-
-
-
Method Detail
-
isRepeatable
public boolean isRepeatable()
- Specified by:
isRepeatablein interfaceorg.apache.http.HttpEntity
-
isChunked
public boolean isChunked()
- Specified by:
isChunkedin interfaceorg.apache.http.HttpEntity
-
getContentLength
public long getContentLength()
- Specified by:
getContentLengthin interfaceorg.apache.http.HttpEntity
-
getContentType
public org.apache.http.Header getContentType()
- Specified by:
getContentTypein interfaceorg.apache.http.HttpEntity
-
getContentEncoding
public org.apache.http.Header getContentEncoding()
- Specified by:
getContentEncodingin interfaceorg.apache.http.HttpEntity
-
getContent
public java.io.InputStream getContent() throws java.io.IOException, java.lang.IllegalStateException- Specified by:
getContentin interfaceorg.apache.http.HttpEntity- Throws:
java.io.IOExceptionjava.lang.IllegalStateException
-
writeTo
public void writeTo(java.io.OutputStream outputStream) throws java.io.IOException- Specified by:
writeToin interfaceorg.apache.http.HttpEntity- Throws:
java.io.IOException
-
isStreaming
public boolean isStreaming()
- Specified by:
isStreamingin interfaceorg.apache.http.HttpEntity
-
consumeContent
public void consumeContent() throws java.io.IOException- Specified by:
consumeContentin interfaceorg.apache.http.HttpEntity- Throws:
java.io.IOException
-
-