import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import jp.sfjp.mikutoga.pmd.binio.PmdExporter;
import jp.sfjp.mikutoga.pmd.binio.PmdLoader;
import jp.sfjp.mikutoga.pmd.model.PmdModel;
import jp.sfjp.mikutoga.pmd.binio.PmdExporter;
import jp.sfjp.mikutoga.pmd.binio.PmdLoader;
import jp.sfjp.mikutoga.pmd.model.PmdModel;
import jp.sfjp.mikutoga.pmd.xml.XmlLoader;
import jp.sfjp.mikutoga.pmd.xml.XmlModelFileType;
import jp.sourceforge.mikutoga.xml.BotherHandler;
import jp.sfjp.mikutoga.pmd.xml.XmlLoader;
import jp.sfjp.mikutoga.pmd.xml.XmlModelFileType;
import jp.sourceforge.mikutoga.xml.BotherHandler;
private ModelFileType inTypes = ModelFileType.NONE;
private ModelFileType outTypes = ModelFileType.NONE;
private String newLine = "\r\n";
private ModelFileType inTypes = ModelFileType.NONE;
private ModelFileType outTypes = ModelFileType.NONE;
private String newLine = "\r\n";
*/
private void xmlOut(PmdModel model, OutputStream ostream)
throws IOException, IllegalPmdDataException{
*/
private void xmlOut(PmdModel model, OutputStream ostream)
throws IOException, IllegalPmdDataException{
XmlModelFileType xmlType = this.outTypes.toXmlType();
exporter.setXmlFileType(xmlType);
exporter.setNewLine(this.newLine);
exporter.setGenerator(this.generator);
XmlModelFileType xmlType = this.outTypes.toXmlType();
exporter.setXmlFileType(xmlType);
exporter.setNewLine(this.newLine);
exporter.setGenerator(this.generator);
- exporter.putPmdModel(model);
+ Writer writer;
+ writer = new OutputStreamWriter(ostream, CS_UTF8);
+ writer = new BufferedWriter(writer);
+
+ exporter.putPmdModel(model, writer);