当前位置: 首页>>代码示例>>Java>>正文


Java UTF8.printStream方法代码示例

本文整理汇总了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();
    }

}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:27,代码来源:Churn.java

示例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();
    }

}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:30,代码来源:MineBugHistory.java

示例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();
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:40,代码来源:CommandLine.java

示例4: PlainPrintBugDescriptions

import edu.umd.cs.findbugs.charsets.UTF8; //导入方法依赖的package包/类
public PlainPrintBugDescriptions(String docTitle, OutputStream out) {
    this.docTitle = docTitle;
    this.out = UTF8.printStream(out);
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:5,代码来源:PlainPrintBugDescriptions.java


注:本文中的edu.umd.cs.findbugs.charsets.UTF8.printStream方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。