net.netheos.pcsapi.request
Class ByteSourceEntity

java.lang.Object
  extended by org.apache.http.entity.AbstractHttpEntity
      extended by 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).


Field Summary
 
Fields inherited from class org.apache.http.entity.AbstractHttpEntity
chunked, contentEncoding, contentType
 
Constructor Summary
ByteSourceEntity(ByteSource bs)
           
 
Method Summary
 void consumeContent()
           
 InputStream getContent()
           
 long getContentLength()
           
 boolean isRepeatable()
           
 boolean isStreaming()
           
 void writeTo(OutputStream outstream)
           
 
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
 

Constructor Detail

ByteSourceEntity

public ByteSourceEntity(ByteSource bs)
Method Detail

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.