public class SCXMLWriter extends Object
Utility class for serializing the Commons SCXML Java object model. Class uses the visitor pattern to trace through the object heirarchy. Used primarily for testing, debugging and visual verification.
NOTE: This writer makes the following assumptions about the original SCXML document(s) parsed to create the object model:Modifier and Type | Class and Description |
---|---|
static class |
SCXMLWriter.Configuration
Configuration for the
SCXMLWriter . |
Modifier and Type | Method and Description |
---|---|
static String |
write(SCXML scxml)
Write out the Commons SCXML object model as an SCXML document (used
primarily for testing, debugging and visual verification), returned as
a string.
|
static void |
write(SCXML scxml,
OutputStream scxmlStream)
Write out the Commons SCXML object model as an SCXML document to the
supplied
OutputStream . |
static void |
write(SCXML scxml,
OutputStream scxmlStream,
SCXMLWriter.Configuration configuration)
Write out the Commons SCXML object model as an SCXML document to the
supplied
OutputStream using the given SCXMLWriter.Configuration . |
static void |
write(SCXML scxml,
Result scxmlResult)
Write out the Commons SCXML object model as an SCXML document to the
supplied
Result . |
static void |
write(SCXML scxml,
Result scxmlResult,
SCXMLWriter.Configuration configuration)
Write out the Commons SCXML object model as an SCXML document to the
supplied
Result using the given SCXMLWriter.Configuration . |
static String |
write(SCXML scxml,
SCXMLWriter.Configuration configuration)
Write out the Commons SCXML object model as an SCXML document (used
primarily for testing, debugging and visual verification) using the
supplied
SCXMLWriter.Configuration , and return as a string. |
static void |
write(SCXML scxml,
Writer scxmlWriter)
Write out the Commons SCXML object model as an SCXML document to the
supplied
Writer . |
static void |
write(SCXML scxml,
Writer scxmlWriter,
SCXMLWriter.Configuration configuration)
Write out the Commons SCXML object model as an SCXML document to the
supplied
Writer using the given SCXMLWriter.Configuration . |
public static String write(SCXML scxml) throws IOException, XMLStreamException
scxml
- The object model to serialize.IOException
- An IO error during serialization.XMLStreamException
- An exception processing the underlying XMLStreamWriter
.public static String write(SCXML scxml, SCXMLWriter.Configuration configuration) throws IOException, XMLStreamException
SCXMLWriter.Configuration
, and return as a string.scxml
- The object model to serialize.configuration
- The SCXMLWriter.Configuration
to use while serializing.IOException
- An IO error during serialization.XMLStreamException
- An exception processing the underlying XMLStreamWriter
.public static void write(SCXML scxml, OutputStream scxmlStream) throws IOException, XMLStreamException
OutputStream
.scxml
- The object model to write out.scxmlStream
- The OutputStream
to write to.IOException
- An IO error during serialization.XMLStreamException
- An exception processing the underlying XMLStreamWriter
.public static void write(SCXML scxml, OutputStream scxmlStream, SCXMLWriter.Configuration configuration) throws IOException, XMLStreamException
OutputStream
using the given SCXMLWriter.Configuration
.scxml
- The object model to write out.scxmlStream
- The OutputStream
to write to.configuration
- The SCXMLWriter.Configuration
to use.IOException
- An IO error during serialization.XMLStreamException
- An exception processing the underlying XMLStreamWriter
.public static void write(SCXML scxml, Writer scxmlWriter) throws IOException, XMLStreamException
Writer
.scxml
- The object model to write out.scxmlWriter
- The Writer
to write to.IOException
- An IO error during serialization.XMLStreamException
- An exception processing the underlying XMLStreamWriter
.public static void write(SCXML scxml, Writer scxmlWriter, SCXMLWriter.Configuration configuration) throws IOException, XMLStreamException
Writer
using the given SCXMLWriter.Configuration
.scxml
- The object model to write out.scxmlWriter
- The Writer
to write to.configuration
- The SCXMLWriter.Configuration
to use.IOException
- An IO error during serialization.XMLStreamException
- An exception processing the underlying XMLStreamWriter
.public static void write(SCXML scxml, Result scxmlResult) throws IOException, XMLStreamException
Result
.scxml
- The object model to write out.scxmlResult
- The Result
to write to.IOException
- An IO error during serialization.XMLStreamException
- An exception processing the underlying XMLStreamWriter
.public static void write(SCXML scxml, Result scxmlResult, SCXMLWriter.Configuration configuration) throws IOException, XMLStreamException
Result
using the given SCXMLWriter.Configuration
.scxml
- The object model to write out.scxmlResult
- The Result
to write to.configuration
- The SCXMLWriter.Configuration
to use.IOException
- An IO error during serialization.XMLStreamException
- An exception processing the underlying XMLStreamWriter
.Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.