use of net.sourceforge.pmd.eclipse.runtime.writer.WriterException in project pmd-eclipse-plugin by pmd.
the class RuleSetWriterImpl method write.
/**
* Write a ruleset as an XML stream
*
* @param writer
* the output writer
* @param ruleSet
* the ruleset to serialize
*/
public void write(OutputStream outputStream, RuleSet ruleSet) throws WriterException {
try {
RuleSetWriter ruleSetWriter = new RuleSetWriter(outputStream);
ruleSetWriter.write(ruleSet);
outputStream.flush();
} catch (RuntimeException e) {
throw new WriterException(e);
} catch (IOException e) {
throw new WriterException(e);
}
}
Aggregations