|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jsieve.util.OutputUtils
public class OutputUtils
Output utilities. These are mostly convenience methods. More power and flexibility is available when using the objects directly.
Constructor Summary | |
---|---|
OutputUtils()
|
Method Summary | |
---|---|
static void |
toSieve(org.apache.jsieve.parser.generated.Node node,
java.io.Writer writer)
Writes the tree rooted at the given node to a Sieve script. |
static void |
toXml(org.apache.jsieve.parser.generated.Node node,
java.io.Writer writer)
Writes the given node as xml. |
static void |
toXmlDocument(org.apache.jsieve.parser.generated.Node node,
java.io.Writer writer)
Writes the given node as xml. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OutputUtils()
Method Detail |
---|
public static void toXmlDocument(org.apache.jsieve.parser.generated.Node node, java.io.Writer writer) throws java.io.IOException, SieveException
Writes the given node as xml.
This convenience method first writes a prolog before calling toXml(Node, Writer)
.
The output format is a subset of the sieve-in-xml Internet Draft.
node
- not nullwriter
- not null
java.io.IOException
- when prolog cannot be written
SieveException
- when script cannot be converted to xmltoXml(Node, Writer)
public static void toXml(org.apache.jsieve.parser.generated.Node node, java.io.Writer writer) throws SieveException
Writes the given node as xml. Note that the xml will be written as a fragment. An appropriate prolog must be added to convert this fragment to a document.
The output format is a subset of the sieve-in-xml Internet Draft. Note that this support is experimental.
node
- not nullwriter
- not null
SieveException
- when script cannot be converted to xmlXmlOut
,
SieveToXml
,
SieveHandler
public static void toSieve(org.apache.jsieve.parser.generated.Node node, java.io.Writer writer) throws SieveException
Writes the tree rooted at the given node to a Sieve script.
node
- not nullwriter
- not null
SieveException
- whenever the serialization fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |