net.sf.csutils.core.utils
Class JaxbWriter<CLSS>

java.lang.Object
  extended by net.sf.csutils.core.utils.JaxbWriter<CLSS>

public class JaxbWriter<CLSS>
extends java.lang.Object

The JAXB bean writer is used to serialize JAXB beans models into XML.


Constructor Summary
JaxbWriter(java.lang.Class<CLSS> pClass, javax.xml.namespace.QName pQName)
           
 
Method Summary
 void write(CLSS pObject, org.xml.sax.ContentHandler pHandler)
          Converts the given JAXB bean to XML by writing to the given ContentHandler.
 void write(CLSS pObject, java.io.File pFile)
          Converts the given JAXB bean to XML by writing to the given File.
 void write(CLSS pObject, org.w3c.dom.Node pNode)
          Converts the given JAXB bean to XML by writing to the given Node.
 void write(CLSS pObject, java.lang.Object pOutput)
          Converts the given JAXB bean to XML by writing to the given output object.
 void write(CLSS pObject, java.io.OutputStream pStream)
          Converts the given JAXB bean to XML by writing to the given OutputStream.
 void write(CLSS pObject, javax.xml.transform.Result pResult)
          Converts the given JAXB bean to XML by writing to the given Result.
 void write(CLSS pObject, java.io.Writer pWriter)
          Converts the given JAXB bean to XML by writing to the given Writer.
 void write(CLSS pObject, javax.xml.stream.XMLEventWriter pWriter)
          Converts the given JAXB bean to XML by writing to the given XMLEventWriter.
 void write(CLSS pObject, javax.xml.stream.XMLStreamWriter pWriter)
          Converts the given JAXB bean to XML by writing to the given XMLStreamWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxbWriter

public JaxbWriter(java.lang.Class<CLSS> pClass,
                  javax.xml.namespace.QName pQName)
Method Detail

write

public void write(CLSS pObject,
                  java.io.OutputStream pStream)
           throws javax.xml.bind.JAXBException
Converts the given JAXB bean to XML by writing to the given OutputStream.

Parameters:
pObject - The JAXB bean to convert.
pStream - The stream to write to.
Throws:
javax.xml.bind.JAXBException - The operation failed.

write

public void write(CLSS pObject,
                  java.io.File pFile)
           throws javax.xml.bind.JAXBException
Converts the given JAXB bean to XML by writing to the given File.

Parameters:
pObject - The JAXB bean to convert.
pFile - The file to write to.
Throws:
javax.xml.bind.JAXBException - The operation failed.

write

public void write(CLSS pObject,
                  java.io.Writer pWriter)
           throws javax.xml.bind.JAXBException
Converts the given JAXB bean to XML by writing to the given Writer.

Parameters:
pObject - The JAXB bean to convert.
pWriter - The writer to write to.
Throws:
javax.xml.bind.JAXBException - The operation failed.

write

public void write(CLSS pObject,
                  javax.xml.transform.Result pResult)
           throws javax.xml.bind.JAXBException
Converts the given JAXB bean to XML by writing to the given Result.

Parameters:
pObject - The JAXB bean to convert.
pResult - The transformer result to write to.
Throws:
javax.xml.bind.JAXBException - The operation failed.

write

public void write(CLSS pObject,
                  org.w3c.dom.Node pNode)
           throws javax.xml.bind.JAXBException
Converts the given JAXB bean to XML by writing to the given Node.

Parameters:
pObject - The JAXB bean to convert.
pNode - The node to write to.
Throws:
javax.xml.bind.JAXBException - The operation failed.

write

public void write(CLSS pObject,
                  javax.xml.stream.XMLEventWriter pWriter)
           throws javax.xml.bind.JAXBException
Converts the given JAXB bean to XML by writing to the given XMLEventWriter.

Parameters:
pObject - The JAXB bean to convert.
pWriter - The StAX event writer to write to.
Throws:
javax.xml.bind.JAXBException - The operation failed.

write

public void write(CLSS pObject,
                  javax.xml.stream.XMLStreamWriter pWriter)
           throws javax.xml.bind.JAXBException
Converts the given JAXB bean to XML by writing to the given XMLStreamWriter.

Parameters:
pObject - The JAXB bean to convert.
pWriter - The StAX stream writer to write to.
Throws:
javax.xml.bind.JAXBException - The operation failed.

write

public void write(CLSS pObject,
                  org.xml.sax.ContentHandler pHandler)
           throws javax.xml.bind.JAXBException
Converts the given JAXB bean to XML by writing to the given ContentHandler.

Parameters:
pObject - The JAXB bean to convert.
pHandler - The SAX content handler to write to.
Throws:
javax.xml.bind.JAXBException - The operation failed.

write

public void write(CLSS pObject,
                  java.lang.Object pOutput)
           throws javax.xml.bind.JAXBException
Converts the given JAXB bean to XML by writing to the given output object.

Parameters:
pObject - The JAXB bean to convert.
pOutput - The output object
Throws:
javax.xml.bind.JAXBException - The operation failed.


Copyright © 2009-2011. All Rights Reserved.