/** * Write this BugCollection to a file as XML. * * @param fileName * the file to write to */ @Override public void writeXML(String fileName) throws IOException { OutputStream out = new FileOutputStream(fileName); if (fileName.endsWith(".gz")) { out = new GZIPOutputStream(out); } writeXML(out); }
/** * Write this BugCollection to a file as XML. * * @param file * the file to write to */ public void writeXML(File file) throws IOException { OutputStream out = new FileOutputStream(file); if (file.getName().endsWith(".gz")) { out = new GZIPOutputStream(out); } writeXML(out); }
@Override public void writeXML(OutputStream out) throws IOException { writeXML(UTF8.writer(out)); }
public static void main(String[] argv) throws Exception { if (argv.length != 3) { System.err.println("Usage: " + NewResults.class.getName() + " <orig results> <new results> <output file>"); System.exit(1); } String origFilename = argv[0]; String newFilename = argv[1]; String outputFilename = argv[2]; NewResults op = new NewResults(origFilename, newFilename); SortedBugCollection result = op.execute(); result.writeXML(outputFilename); } }
public static void main(String[] args) throws Exception { if (args.length != 2) { System.err.println("Usage: " + RegenerateClassFeatures.class.getName() + " <bug collection> <jar file>"); System.exit(1); } SortedBugCollection bugCollection = new SortedBugCollection(); bugCollection.readXML(args[0]); new RegenerateClassFeatures(bugCollection, args[1]).execute(); bugCollection.writeXML(System.out); } }
/** * Write the BugCollection to given output stream as XML. The output stream * will be closed, even if an exception is thrown. * * @param out * the OutputStream to write to */ @Override public void writeXML(@WillClose Writer out) throws IOException { assert project != null; bugsPopulated(); XMLOutput xmlOutput; // if (project == null) throw new NullPointerException("No project"); xmlOutput = new OutputStreamXMLOutput(out); writeXML(xmlOutput); }
/** * Convert the BugCollection into a dom4j Document object. * * @return the Document representing the BugCollection as a dom4j tree */ @Override public Document toDocument() { // if (project == null) throw new NullPointerException("No project"); assert project != null; DocumentFactory docFactory = new DocumentFactory(); Document document = docFactory.createDocument(); Dom4JXMLOutput treeBuilder = new Dom4JXMLOutput(document); try { writeXML(treeBuilder); } catch (IOException e) { // Can't happen } return document; }
origBC.writeXML(outBytes);
/** * Write this BugCollection to a file as XML. * * @param fileName * the file to write to */ @Override public void writeXML(String fileName) throws IOException { OutputStream out = new FileOutputStream(fileName); if (fileName.endsWith(".gz")) { out = new GZIPOutputStream(out); } writeXML(out); }
/** * Write this BugCollection to a file as XML. * * @param file * the file to write to */ public void writeXML(File file) throws IOException { OutputStream out = new FileOutputStream(file); if (file.getName().endsWith(".gz")) { out = new GZIPOutputStream(out); } writeXML(out); }
@Override public void writeXML(OutputStream out) throws IOException { writeXML(UTF8.writer(out)); }
public static void main(String[] argv) throws Exception { if (argv.length != 3) { System.err.println("Usage: " + NewResults.class.getName() + " <orig results> <new results> <output file>"); System.exit(1); } String origFilename = argv[0]; String newFilename = argv[1]; String outputFilename = argv[2]; NewResults op = new NewResults(origFilename, newFilename); SortedBugCollection result = op.execute(); result.writeXML(outputFilename); } }
public static void main(String[] args) throws Exception { if (args.length != 2) { System.err.println("Usage: " + RegenerateClassFeatures.class.getName() + " <bug collection> <jar file>"); System.exit(1); } SortedBugCollection bugCollection = new SortedBugCollection(); bugCollection.readXML(args[0]); new RegenerateClassFeatures(bugCollection, args[1]).execute(); bugCollection.writeXML(System.out); } }
/** * Convert the BugCollection into a dom4j Document object. * * @return the Document representing the BugCollection as a dom4j tree */ @Override public Document toDocument() { // if (project == null) throw new NullPointerException("No project"); assert project != null; DocumentFactory docFactory = new DocumentFactory(); Document document = docFactory.createDocument(); Dom4JXMLOutput treeBuilder = new Dom4JXMLOutput(document); try { writeXML(treeBuilder); } catch (IOException e) { // Can't happen } return document; }