net.netheos.pcsapi.request
Class ByteSourceBody

java.lang.Object
  extended by org.apache.http.entity.mime.content.AbstractContentBody
      extended by net.netheos.pcsapi.request.ByteSourceBody
All Implemented Interfaces:
org.apache.http.entity.mime.content.ContentBody, org.apache.http.entity.mime.content.ContentDescriptor

public class ByteSourceBody
extends org.apache.http.entity.mime.content.AbstractContentBody

Adapter class to represent a byte source as an http entity (for uploads).


Constructor Summary
ByteSourceBody(ByteSource bs, String filename, String contentType)
           
 
Method Summary
 void consumeContent()
           
 String getCharset()
           
 InputStream getContent()
           
 long getContentLength()
           
 String getFilename()
           
 String getTransferEncoding()
           
 void writeTo(OutputStream outstream)
           
 
Methods inherited from class org.apache.http.entity.mime.content.AbstractContentBody
getMediaType, getMimeType, getSubType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteSourceBody

public ByteSourceBody(ByteSource bs,
                      String filename,
                      String contentType)
Method Detail

getContent

public InputStream getContent()
                       throws IOException,
                              IllegalStateException
Throws:
IOException
IllegalStateException

writeTo

public void writeTo(OutputStream outstream)
             throws IOException
Throws:
IOException

consumeContent

public void consumeContent()
                    throws IOException
Throws:
IOException

getCharset

public String getCharset()

getTransferEncoding

public String getTransferEncoding()

getFilename

public String getFilename()

getContentLength

public long getContentLength()


Copyright © 2014. All Rights Reserved.