net.netheos.pcsapi.request
Class ByteSourceBody
java.lang.Object
org.apache.http.entity.mime.content.AbstractContentBody
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).
| 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 |
ByteSourceBody
public ByteSourceBody(ByteSource bs,
String filename,
String contentType)
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.