public class RawBody extends Body
This class is a pure implementation of Body, and does not provide any class specific operations.
CAN_INVALIDATE, contentType, CT_APP_OCTET_STREAM, CT_DEFAULT, 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(HeaderSet headers,
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, write
public RawBody(HeaderSet headers, 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 Body
java.io.IOException
public boolean contentAvailable()
contentAvailable
in class Body
public 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 Body
java.io.IOException
Body.parse()
public void writeContent(java.io.OutputStream ios, int flags) throws java.io.IOException
Body
Body.write(java.io.OutputStream, int)
, but does not include the
headers for the body.writeContent
in class Body
java.io.IOException
public void purgeContent()
Body
purgeContent
in class Body
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel