Package edu.umd.cs.findbugs.xml

Examples of edu.umd.cs.findbugs.xml.OutputStreamXMLOutput.finish()


            xmlOutput.closeTag("findbugs-invocation");
            xmlOutput.flush();
        } finally {
            if (finish) {
                xmlOutput.finish();
            }
        }
    }

    // package-private for testing
View Full Code Here


        OutputStream out = new FileOutputStream(f);
        XMLOutput xmlOutput = new OutputStreamXMLOutput(out);
        try {
            writeXML(xmlOutput, f, bugCollection);
        } finally {
            xmlOutput.finish();
        }
    }

    /**
     * Read Project from named file.
View Full Code Here

            xmlOutput.beginDocument();
            xmlOutput.openTag("FindBugsFilter");
            writeBodyAsXML(xmlOutput);
            xmlOutput.closeTag("FindBugsFilter");
        } finally {
            xmlOutput.finish();
        }
    }

    public void writeEnabledMatchersAsXML(@WillClose OutputStream out) throws IOException {
View Full Code Here

                    child.writeXML(xmlOutput, false);
                }
            }
            xmlOutput.closeTag("FindBugsFilter");
        } finally {
            xmlOutput.finish();
        }
    }

    public void writeBodyAsXML(XMLOutput xmlOutput) throws IOException {
        Iterator<Matcher> i = childIterator();
View Full Code Here

    public void reportSummary(@WillClose OutputStream out) throws IOException {
        XMLOutput xmlOutput = new OutputStreamXMLOutput(out);
        try {
            writeXML(xmlOutput);
        } finally {
            xmlOutput.finish();
        }
    }

    /**
     * Transform summary information to HTML.
View Full Code Here

    private String writeXMLAndGetStringOutput(SourceMatcher matcher, boolean disabled) throws IOException {
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        XMLOutput xmlOutput = new OutputStreamXMLOutput(outputStream);

        matcher.writeXML(xmlOutput, disabled);
        xmlOutput.finish();

        return outputStream.toString().trim();
    }

View Full Code Here

    private String writeXMLAndGetStringOutput(NotMatcher notMatcher) throws IOException {
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        XMLOutput xmlOutput = new OutputStreamXMLOutput(outputStream);

        notMatcher.writeXML(xmlOutput, false);
        xmlOutput.finish();

        String xmlOutputCreated = outputStream.toString();
        return xmlOutputCreated;
    }
View Full Code Here

    private String writeXML(BugInstance inst, BugCollection bc) throws IOException {
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        XMLOutput out = new OutputStreamXMLOutput(bout);
        inst.writeXML(out, bc, bc.getWithMessages());
        out.finish();
        return new String(bout.toByteArray(), "UTF-8");
    }

    private void get(Iterator<BugProperty> iter) {
        try {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.