public abstract class HttpBody extends Object implements HttpEntity
| Modifier and Type | Method and Description |
|---|---|
Charset |
getCharset()
Returns the charset
|
Charset |
getCharset(Charset defaultCharset) |
long |
getContentLength()
Returns the content length
|
static HttpBody |
newInstance(MimeType contentType,
byte[] buf) |
static HttpBody |
newInstance(MimeType contentType,
byte[] buf,
int offset,
int length) |
static HttpBody |
newInstance(MimeType contentType,
File file) |
static HttpBody |
newInstance(MimeType contentType,
String s) |
static HttpBody |
newInstance(String contentType,
byte[] buf) |
static HttpBody |
newInstance(String contentType,
byte[] buf,
int offset,
int length) |
static HttpBody |
newInstance(String contentType,
File file) |
static HttpBody |
newInstance(String contentType,
String s) |
void |
writeTo(OutputStream out)
Write this entity into
out |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContent, getContentTypepublic static HttpBody newInstance(MimeType contentType, byte[] buf, int offset, int length)
public static HttpBody newInstance(String contentType, byte[] buf, int offset, int length)
public Charset getCharset()
HttpEntitygetCharset in interface HttpEntitypublic long getContentLength()
throws IOException
HttpEntitygetContentLength in interface HttpEntityIOExceptionpublic void writeTo(OutputStream out) throws IOException
HttpEntityoutwriteTo in interface HttpEntityout - The output streamIOException - if write failedCopyright © 2015–2017 SDKLite. All rights reserved.