public abstract class ParseHttpBody
extends java.lang.Object
| Constructor and Description |
|---|
ParseHttpBody(java.lang.String contentType,
long contentLength)
Creates an
ParseHttpBody with given Content-Type and Content-Length. |
| Modifier and Type | Method and Description |
|---|---|
abstract java.io.InputStream |
getContent()
Returns the content of this body.
|
long |
getContentLength()
Returns the number of bytes which will be written to
out when writeTo(java.io.OutputStream) is
called, or -1 if that count is unknown. |
java.lang.String |
getContentType()
Returns the
Content-Type of this body. |
abstract void |
writeTo(java.io.OutputStream out)
Writes the content of this request to
out. |
public ParseHttpBody(java.lang.String contentType,
long contentLength)
ParseHttpBody with given Content-Type and Content-Length.contentType - The Content-Type of the ParseHttpBody.contentLength - The Content-Length of the ParseHttpBody.public abstract java.io.InputStream getContent()
throws java.io.IOException
java.io.IOException - Throws an exception if the content of this body is inaccessible.public abstract void writeTo(java.io.OutputStream out)
throws java.io.IOException
out.out - The outputStream the content of this body needs to be written to.java.io.IOException - Throws an exception if the content of this body can not be written to out.public long getContentLength()
out when writeTo(java.io.OutputStream) is
called, or -1 if that count is unknown.public java.lang.String getContentType()
Content-Type of this body.Content-Type of this body.