public class XMLBody extends Body
Body
,
BodyFactory
Modifier and Type | Class and Description |
---|---|
static class |
XMLBody.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 |
---|
XMLBody(com.vordel.mime.HeaderSet headers,
com.vordel.mime.ContentType contentType,
org.w3c.dom.Document doc) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
contentAvailable() |
org.w3c.dom.Document |
getDocument() |
static org.w3c.dom.Document |
getDocument(Message m) |
static XMLBody |
locate(Message m)
Locate the XML Body from the message content if it exists.
|
void |
parse(java.io.InputStream input)
Parse a body from a specific InputStream.
|
void |
purgeContent()
Bodies are purged() when they are no longer in use.
|
void |
setDocument(org.w3c.dom.Document doc) |
void |
setStylesheet(javax.xml.transform.Templates stylesheet)
Supply a stylesheet to be used when writing the content of this
document.
|
void |
writeContent(java.io.OutputStream os,
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, getContentLength, getContentType, getHeaders, getInputStream, getParent, getSource, initSource, parse, registerFactory, setParent, sevenbit, willwrite, write
public XMLBody(com.vordel.mime.HeaderSet headers, com.vordel.mime.ContentType contentType, org.w3c.dom.Document doc)
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean contentAvailable()
contentAvailable
in class Body
public void setStylesheet(javax.xml.transform.Templates stylesheet)
stylesheet
- The stylesheet to apply.writeContent(java.io.OutputStream, int)
,
Body.write(java.io.OutputStream, int)
public void purgeContent()
Body
purgeContent
in class Body
public static org.w3c.dom.Document getDocument(Message m) throws java.io.IOException
java.io.IOException
public static XMLBody locate(Message m) throws java.io.IOException
m
- The Message in which to locate the XML Bodyjava.io.IOException
- If there is no HTTP content in the message, or the Body isn't XML.public void parse(java.io.InputStream input) throws java.io.IOException
Body
This should be considered "private" to callers:
it must be invoked via
Body.parse()
parse
in class Body
input
- The InputStream from which to parse the body.java.io.IOException
- if there are problems reading from the InputStream.Body.parse()
public org.w3c.dom.Document getDocument() throws java.io.IOException
java.io.IOException
public void setDocument(org.w3c.dom.Document doc)
public void writeContent(java.io.OutputStream os, 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
os
- OutputStream The OutputStream destination for the Body.flags
- Customize what gets written.java.io.IOException
- If there are problems writing to the OutputStream.
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel