net.netheos.pcsapi.request
Class ByteSourceEntity
java.lang.Object
org.apache.http.entity.AbstractHttpEntity
net.netheos.pcsapi.request.ByteSourceEntity
- All Implemented Interfaces:
- org.apache.http.HttpEntity
public class ByteSourceEntity
- extends org.apache.http.entity.AbstractHttpEntity
Adapter class to represent a byte source as an http entity (for uploads).
| Fields inherited from class org.apache.http.entity.AbstractHttpEntity |
chunked, contentEncoding, contentType |
| Methods inherited from class org.apache.http.entity.AbstractHttpEntity |
getContentEncoding, getContentType, isChunked, setChunked, setContentEncoding, setContentEncoding, setContentType, setContentType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteSourceEntity
public ByteSourceEntity(ByteSource bs)
isRepeatable
public boolean isRepeatable()
getContentLength
public long getContentLength()
getContent
public InputStream getContent()
throws IOException,
IllegalStateException
- Throws:
IOException
IllegalStateException
writeTo
public void writeTo(OutputStream outstream)
throws IOException
- Throws:
IOException
isStreaming
public boolean isStreaming()
consumeContent
public void consumeContent()
throws IOException
- Specified by:
consumeContent in interface org.apache.http.HttpEntity- Overrides:
consumeContent in class org.apache.http.entity.AbstractHttpEntity
- Throws:
IOException
Copyright © 2014. All Rights Reserved.