use of de.huxhorn.sulky.plist.impl.PropertyListWriter in project sulky by huxi.
the class PropertyListEncoder method encode.
public void encode(PropertyList obj, OutputStream into) throws IOException {
PropertyListWriter propertyListWriter = new PropertyListWriter();
XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
try {
XMLStreamWriter writer = outputFactory.createXMLStreamWriter(new OutputStreamWriter(into, StandardCharsets.UTF_8));
propertyListWriter.write(writer, obj, true);
writer.close();
} catch (XMLStreamException e) {
throw new IOException("Exception while writing XML!", e);
}
}
Aggregations