public class Writer extends AWriter
Modifier and Type | Field and Description |
---|---|
protected static javax.xml.stream.XMLOutputFactory |
FACTORY
The xml output factory.
|
protected boolean |
genids
Control flag for generating ids.
|
protected boolean |
indent
Control flag for generating indention.
|
protected boolean |
newline
Control flag for generating newlines.
|
XML_INCLUDE_FIELDS
Constructor and Description |
---|
Writer()
Create a new reader (with genids=true and indent=true).
|
Writer(boolean genids)
Create a new reader (with genids=true and indent=true).
|
Writer(boolean genids,
boolean indent,
boolean newline)
Create a new reader.
|
Modifier and Type | Method and Description |
---|---|
static javax.xml.stream.XMLStreamWriter |
getWriter(AWriteContext context) |
protected QName[] |
getXMLPath(java.util.List<StackElement> stack)
Get the xml path for a stack.
|
void |
write(IObjectWriterHandler handler,
java.lang.Object object,
java.io.OutputStream out,
java.lang.ClassLoader classloader,
java.lang.Object context)
Write the properties to an xml.
|
void |
write(IObjectWriterHandler handler,
java.lang.Object object,
java.lang.String encoding,
java.io.OutputStream out,
java.lang.ClassLoader classloader,
java.lang.Object context)
Write the properties to an xml.
|
protected void |
writeEndObject(javax.xml.stream.XMLStreamWriter writer,
int level)
Write the end of an object.
|
protected void |
writeIndentation(javax.xml.stream.XMLStreamWriter writer,
int level)
Write the indentation.
|
protected void |
writeNewline(javax.xml.stream.XMLStreamWriter writer) |
protected void |
writeObject(WriteContextDesktop wc,
java.lang.Object object,
QName tag)
Write an object to xml.
|
protected void |
writeStartObject(javax.xml.stream.XMLStreamWriter writer,
QName tag,
int level)
Write the start of an object.
|
protected void |
writeSubobjects(WriteContextDesktop wc,
TreeNode node,
TypeInfo typeinfo)
Write the subobjects of an object.
|
objectToByteArray, objectToByteArray, objectToByteArray, objectToOutputStream, objectToXML, objectToXML
protected static final javax.xml.stream.XMLOutputFactory FACTORY
protected boolean genids
protected boolean indent
protected boolean newline
public Writer()
readerhandler
- The handler.public Writer(boolean genids)
readerhandler
- The handler.public Writer(boolean genids, boolean indent, boolean newline)
readerhandler
- The handler.public void write(IObjectWriterHandler handler, java.lang.Object object, java.io.OutputStream out, java.lang.ClassLoader classloader, java.lang.Object context) throws java.lang.Exception
public void write(IObjectWriterHandler handler, java.lang.Object object, java.lang.String encoding, java.io.OutputStream out, java.lang.ClassLoader classloader, java.lang.Object context) throws java.lang.Exception
protected void writeObject(WriteContextDesktop wc, java.lang.Object object, QName tag) throws java.lang.Exception
java.lang.Exception
protected void writeSubobjects(WriteContextDesktop wc, TreeNode node, TypeInfo typeinfo) throws java.lang.Exception
java.lang.Exception
protected void writeStartObject(javax.xml.stream.XMLStreamWriter writer, QName tag, int level) throws java.lang.Exception
java.lang.Exception
protected void writeEndObject(javax.xml.stream.XMLStreamWriter writer, int level) throws java.lang.Exception
java.lang.Exception
protected void writeIndentation(javax.xml.stream.XMLStreamWriter writer, int level) throws java.lang.Exception
java.lang.Exception
protected void writeNewline(javax.xml.stream.XMLStreamWriter writer) throws java.lang.Exception
java.lang.Exception
protected QName[] getXMLPath(java.util.List<StackElement> stack)
stack
- The stack.public static javax.xml.stream.XMLStreamWriter getWriter(AWriteContext context)