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


Java UTF8.printWriter方法代码示例

本文整理汇总了Java中edu.umd.cs.findbugs.charsets.UTF8.printWriter方法的典型用法代码示例。如果您正苦于以下问题:Java UTF8.printWriter方法的具体用法?Java UTF8.printWriter怎么用?Java UTF8.printWriter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在edu.umd.cs.findbugs.charsets.UTF8的用法示例。


在下文中一共展示了UTF8.printWriter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import edu.umd.cs.findbugs.charsets.UTF8; //导入方法依赖的package包/类
public static void main(String[] args) throws IOException, DocumentException {
    FindBugs.setNoAnalysis();
    DetectorFactoryCollection.instance();
    ListBugDatabaseInfoCommandLine commandLine = new ListBugDatabaseInfoCommandLine();
    int argCount = commandLine.parse(args, 0, Integer.MAX_VALUE, USAGE);

    PrintWriter out = UTF8.printWriter(System.out, true);
    if (argCount == args.length)
        listVersion(out, null, commandLine.formatDates);
    else {
        out.println("version\ttime\tclasses\tNCSS\terrors\ttotal\thigh\tmedium\tlow\tfile");
        while (argCount < args.length) {
            String fileName = args[argCount++];
            listVersion(out, fileName, commandLine.formatDates);
        }
    }
    out.close();
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:19,代码来源:ListBugDatabaseInfo.java

示例2: main

import edu.umd.cs.findbugs.charsets.UTF8; //导入方法依赖的package包/类
public static void main(String[] argv) throws Exception {

        FindBugs.setNoAnalysis();
        final CSPoptions options = new CSPoptions();
        final CSRCommandLine commandLine = new CSRCommandLine(options);
        int argCount = commandLine.parse(argv, 0, 1, "Usage: " + CloudSyncAndReport.class.getName()
                + " [options] [<results1> <results2> ... <resultsn>] ");

        if (argCount < argv.length)
            options.analysisFile = argv[argCount];

        CloudSyncAndReport csr = new CloudSyncAndReport(options);
        csr.load();

        csr.sync();
        PrintWriter out = UTF8.printWriter(System.out);
        csr.report(out);
        out.flush();
        csr.shutdown();
        out.close();
    }
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:22,代码来源:CloudSyncAndReport.java

示例3: write

import edu.umd.cs.findbugs.charsets.UTF8; //导入方法依赖的package包/类
/**
 * Save the project to an output file.
 *
 * @param outputFile
 *            name of output file
 * @param useRelativePaths
 *            true if the project should be written using only relative
 *            paths
 * @param relativeBase
 *            if useRelativePaths is true, this file is taken as the base
 *            directory in terms of which all files should be made relative
 * @throws IOException
 *             if an error occurs while writing
 */
@Deprecated
public void write(String outputFile, boolean useRelativePaths, String relativeBase) throws IOException {
    PrintWriter writer = UTF8.printWriter(outputFile);
    try {
        writer.println(JAR_FILES_KEY);
        for (String jarFile : analysisTargets) {
            if (useRelativePaths) {
                jarFile = convertToRelative(jarFile, relativeBase);
            }
            writer.println(jarFile);
        }

        writer.println(SRC_DIRS_KEY);
        for (String srcDir : srcDirList) {
            if (useRelativePaths) {
                srcDir = convertToRelative(srcDir, relativeBase);
            }
            writer.println(srcDir);
        }

        writer.println(AUX_CLASSPATH_ENTRIES_KEY);
        for (String auxClasspathEntry : auxClasspathEntryList) {
            if (useRelativePaths) {
                auxClasspathEntry = convertToRelative(auxClasspathEntry, relativeBase);
            }
            writer.println(auxClasspathEntry);
        }

        if (useRelativePaths) {
            writer.println(OPTIONS_KEY);
            writer.println(RELATIVE_PATHS + "=true");
        }
    } finally {
        writer.close();
    }

    // Project successfully saved
    isModified = false;
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:54,代码来源:Project.java

示例4: setOutputStream

import edu.umd.cs.findbugs.charsets.UTF8; //导入方法依赖的package包/类
/**
 * Set the PrintStream to write bug output to.
 *
 * @param outputStream
 *            the PrintStream to write bug output to
 */
public void setOutputStream(PrintStream outputStream) {
    this.outputStream = UTF8.printWriter(outputStream, true);
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:10,代码来源:TextUIBugReporter.java


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