public class DeviceWriter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LOCAL_NS |
static java.lang.String |
PREFIX |
Modifier and Type | Method and Description |
---|---|
static void |
writeToXml(java.io.OutputStream out,
java.util.Collection<Device> devices)
Writes the XML definition of the given
Collection of Device s according to
DeviceSchema.NS_DEVICES_URI to the OutputStream . |
public static final java.lang.String LOCAL_NS
public static final java.lang.String PREFIX
public static void writeToXml(java.io.OutputStream out, java.util.Collection<Device> devices) throws javax.xml.parsers.ParserConfigurationException, javax.xml.transform.TransformerFactoryConfigurationError, javax.xml.transform.TransformerException
Collection
of Device
s according to
DeviceSchema.NS_DEVICES_URI
to the OutputStream
.
Note that it is up to the caller to close the OutputStream
.out
- The OutputStream
to write the resulting XML to.devices
- The Device
s from which to generate the XML.javax.xml.parsers.ParserConfigurationException
javax.xml.transform.TransformerFactoryConfigurationError
javax.xml.transform.TransformerException