com.openharbor.beck
Class ObjectXMLWriter

java.lang.Object
  extended bycom.openharbor.beck.ObjectXMLWriter

public class ObjectXMLWriter
extends java.lang.Object

Copies Java objects to XML.


Field Summary
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
ObjectXMLWriter(MapToXML.Source mapperSource)
          Allocate mappers from the given Source.
ObjectXMLWriter(MapToXML mapper)
          Use the given mapper.
 
Method Summary
 void write(java.lang.Object source, java.io.OutputStream out)
          Copy an object to XML encoded in UTF-8.
 void write(java.lang.Object source, java.io.Writer writer)
          Copy an object to XML.
 void write(java.lang.Object source, XMLWriter writer)
          Copy an object to XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.commons.logging.Log log
Constructor Detail

ObjectXMLWriter

public ObjectXMLWriter(MapToXML mapper)
Use the given mapper. This is not thread-safe.


ObjectXMLWriter

public ObjectXMLWriter(MapToXML.Source mapperSource)
Allocate mappers from the given Source.

Method Detail

write

public void write(java.lang.Object source,
                  XMLWriter writer)
           throws java.lang.Exception
Copy an object to XML.

Throws:
java.lang.Exception

write

public void write(java.lang.Object source,
                  java.io.Writer writer)
           throws java.lang.Exception
Copy an object to XML.

Throws:
java.lang.Exception

write

public void write(java.lang.Object source,
                  java.io.OutputStream out)
           throws java.lang.Exception
Copy an object to XML encoded in UTF-8.

Throws:
java.lang.Exception