本文整理汇总了Java中edu.umd.cs.findbugs.charsets.UTF8.printStream方法的典型用法代码示例。如果您正苦于以下问题:Java UTF8.printStream方法的具体用法?Java UTF8.printStream怎么用?Java UTF8.printStream使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.umd.cs.findbugs.charsets.UTF8
的用法示例。
在下文中一共展示了UTF8.printStream方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import edu.umd.cs.findbugs.charsets.UTF8; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
DetectorFactoryCollection.instance(); // load plugins
Churn churn = new Churn();
ChurnCommandLine commandLine = churn.new ChurnCommandLine();
int argCount = commandLine
.parse(args, 0, 2, "Usage: " + Churn.class.getName() + " [options] [<xml results> [<history]] ");
SortedBugCollection bugCollection = new SortedBugCollection();
if (argCount < args.length)
bugCollection.readXML(args[argCount++]);
else
bugCollection.readXML(System.in);
churn.setBugCollection(bugCollection);
churn.execute();
PrintStream out = System.out;
try {
if (argCount < args.length) {
out = UTF8.printStream(new FileOutputStream(args[argCount++]), true);
}
churn.dump(out);
} finally {
out.close();
}
}
示例2: main
import edu.umd.cs.findbugs.charsets.UTF8; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
FindBugs.setNoAnalysis();
DetectorFactoryCollection.instance(); // load plugins
MineBugHistory mineBugHistory = new MineBugHistory();
MineBugHistoryCommandLine commandLine = mineBugHistory.new MineBugHistoryCommandLine();
int argCount = commandLine.parse(args, 0, 2, "Usage: " + MineBugHistory.class.getName()
+ " [options] [<xml results> [<history]] ");
SortedBugCollection bugCollection = new SortedBugCollection();
if (argCount < args.length)
bugCollection.readXML(args[argCount++]);
else
bugCollection.readXML(System.in);
mineBugHistory.setBugCollection(bugCollection);
mineBugHistory.execute();
PrintStream out = System.out;
try {
if (argCount < args.length) {
out = UTF8.printStream(new FileOutputStream(args[argCount++]), true);
}
mineBugHistory.dump(out);
} finally {
out.close();
}
}
示例3: printUsage
import edu.umd.cs.findbugs.charsets.UTF8; //导入方法依赖的package包/类
/**
* Print command line usage information to given stream.
*
* @param os
* the output stream
*/
public void printUsage(OutputStream os) {
int count = 0;
PrintStream out = UTF8.printStream(os);
for (String option : optionList) {
if (optionGroups.containsKey(count)) {
out.println(" " + optionGroups.get(count));
}
count++;
if (unlistedOptions.contains(option))
continue;
out.print(" ");
StringBuilder buf = new StringBuilder();
buf.append(option);
if (optionExtraPartSynopsisMap.get(option) != null) {
String optionExtraPartSynopsis = optionExtraPartSynopsisMap.get(option);
buf.append("[:");
buf.append(optionExtraPartSynopsis);
buf.append("]");
}
if (requiresArgumentSet.contains(option)) {
buf.append(" <");
buf.append(argumentDescriptionMap.get(option));
buf.append(">");
}
printField(out, buf.toString(), maxWidth + 1);
out.println(optionDescriptionMap.get(option));
}
out.flush();
}
示例4: PlainPrintBugDescriptions
import edu.umd.cs.findbugs.charsets.UTF8; //导入方法依赖的package包/类
public PlainPrintBugDescriptions(String docTitle, OutputStream out) {
this.docTitle = docTitle;
this.out = UTF8.printStream(out);
}