net.sf.uadetector.writer
Class XmlDataWriter

java.lang.Object
  extended by net.sf.uadetector.writer.XmlDataWriter

@ThreadSafe
public final class XmlDataWriter
extends java.lang.Object

This utility is intended to transform an instance of Data into an UAS data conform XML document and allows us to recreate an uas.xml.

Author:
André Rouél

Method Summary
static void write(Data data, java.io.OutputStream outputStream)
          Transforms a given Data instance into XML and writes it to the passed in OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

write

public static void write(@Nonnull
                         Data data,
                         @Nonnull
                         java.io.OutputStream outputStream)
                  throws javax.xml.parsers.ParserConfigurationException,
                         javax.xml.transform.TransformerException
Transforms a given Data instance into XML and writes it to the passed in OutputStream.

Parameters:
data - Data to transform into XML
outputStream - output stream to write
Throws:
javax.xml.parsers.ParserConfigurationException - If a DocumentBuilder cannot be created which satisfies the configuration requested.
javax.xml.transform.TransformerException - If an unrecoverable error occurs during the course of the transformation.


Copyright © 2011-2014. All Rights Reserved.