public void save(@NotNull Review review, @NotNull Writer writer) throws RevuException
{
checkXStream();
IndentingXMLStreamWriter xmlWriter;
try
{
xmlWriter = new IndentingXMLStreamWriter(XMLOutputFactory.newInstance().createXMLStreamWriter(writer));
xmlWriter.writeStartDocument("UTF-8", "1.0");
xmlWriter.setDefaultNamespace("http://plugins.intellij.net/revu");
xstreamDataHolder.put(ReviewExternalizerXmlImpl.CONTEXT_KEY_REVIEW, null);
xstream.marshal(review, new XppDriver().createWriter(writer), xstreamDataHolder);
}
catch (XMLStreamException e)
{