public class RawBody extends Body
This class is a pure implementation of Body, and does not provide any class specific operations.
| Modifier and Type | Class and Description |
|---|---|
static class |
RawBody.Factory |
CAN_INVALIDATE, contentType, CT_APP_OCTET_STREAM, CT_DEFAULT, CT_MULTIPART_FORM_DATA, CT_MULTIPART_RELATED, CT_TEXT_PLAIN, CT_TEXT_XML_UTF8, CT_XOP_APPLICATION_XML, PUSH_WRITE, REMOVE_XFER_ENCODING_ON_WRITE_DEPRECATED, RETAIN_XFER_ENCODING_ON_READ, WRITE_NO_CTE| Constructor and Description |
|---|
RawBody(com.vordel.mime.HeaderSet headers,
com.vordel.mime.ContentType contentType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contentAvailable() |
long |
getContentLength(int flags)
Return the Content length of the body.
|
void |
parse(java.io.InputStream is)
Parse a body from a specific InputStream.
|
void |
purgeContent()
Bodies are purged() when they are no longer in use.
|
void |
writeContent(java.io.OutputStream ios,
int flags)
Write the content of the body to the specified OutputStream
This is similar to
Body.write(java.io.OutputStream, int), but does not include the
headers for the body. |
bufferInput, create, dispose, fini, getContentEncoding, getContentId, getContentType, getHeaders, getInputStream, getParent, getSource, initSource, parse, registerFactory, setParent, sevenbit, willwrite, writepublic RawBody(com.vordel.mime.HeaderSet headers,
com.vordel.mime.ContentType contentType)
public long getContentLength(int flags)
throws java.io.IOException
Body
Note that as the flags sent to the Body.write(java.io.OutputStream, int) method may
affect the output, this method must be passed the same flags.
getContentLength in class Bodyflags - The same flags that are used to modify the output from the write method.java.io.IOException - If there's a problem determining the length of the content.public boolean contentAvailable()
contentAvailable in class Bodypublic void parse(java.io.InputStream is)
throws java.io.IOException
Body
This should be considered "private" to callers:
it must be invoked via
Body.parse()
parse in class Bodyis - The InputStream from which to parse the body.java.io.IOException - if there are problems reading from the InputStream.Body.parse()public void writeContent(java.io.OutputStream ios,
int flags)
throws java.io.IOException
BodyBody.write(java.io.OutputStream, int), but does not include the
headers for the body.writeContent in class Bodyios - OutputStream The OutputStream destination for the Body.flags - Customize what gets written.java.io.IOException - If there are problems writing to the OutputStream.public void purgeContent()
BodypurgeContent in class Body
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel