當前位置: 首頁>>代碼示例>>Java>>正文


Java UserTextFile類代碼示例

本文整理匯總了Java中edu.umd.cs.findbugs.charsets.UserTextFile的典型用法代碼示例。如果您正苦於以下問題:Java UserTextFile類的具體用法?Java UserTextFile怎麽用?Java UserTextFile使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


UserTextFile類屬於edu.umd.cs.findbugs.charsets包,在下文中一共展示了UserTextFile類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: SuppressionDecorator

import edu.umd.cs.findbugs.charsets.UserTextFile; //導入依賴的package包/類
public SuppressionDecorator(ComponentPlugin<BugReporterDecorator> plugin, BugReporter delegate) {
    super(plugin, delegate);
    category = plugin.getProperties().getProperty("category");
    if (DetectorFactoryCollection.instance().getBugCategory(category) == null) {
        throw new IllegalArgumentException("Unable to find category " + category);
    }

    final String adjustmentSource = plugin.getProperties().getProperty("packageSource");
    String packageList = plugin.getProperties().getProperty("packageList");

    try {
        if (packageList != null) {
            processPackageList(new StringReader(packageList));
        }
        if (adjustmentSource != null) {
            URL u;

            if (adjustmentSource.startsWith("file:") || adjustmentSource.startsWith("http:")
                    || adjustmentSource.startsWith("https:"))
                u = new URL(adjustmentSource);
            else {
                u = plugin.getPlugin().getResource(adjustmentSource);
                if (u == null)
                    u = DetectorFactoryCollection.getCoreResource(adjustmentSource);

            }
            if (u != null) {
                Reader rawIn =  UserTextFile.bufferedReader(u.openStream());
                processPackageList(rawIn);
            }

        }
    } catch (IOException e) {
        throw new RuntimeException("Unable to load " + category + " filters from " + adjustmentSource, e);
    }
}
 
開發者ID:ytus,項目名稱:findbugs-all-the-bugs,代碼行數:37,代碼來源:SuppressionDecorator.java

示例2: readFromStandardInput

import edu.umd.cs.findbugs.charsets.UserTextFile; //導入依賴的package包/類
public static void readFromStandardInput(Collection<String> result) throws IOException {
     readFrom(result, UserTextFile.bufferedReader(System.in));
}
 
開發者ID:ytus,項目名稱:findbugs-all-the-bugs,代碼行數:4,代碼來源:RejarClassesForAnalysis.java

示例3: readFromStandardInput

import edu.umd.cs.findbugs.charsets.UserTextFile; //導入依賴的package包/類
public static List<String> readFromStandardInput() throws IOException {
    return readFrom(UserTextFile.reader(System.in));
}
 
開發者ID:ytus,項目名稱:findbugs-all-the-bugs,代碼行數:4,代碼來源:CountClassVersions.java


注:本文中的edu.umd.cs.findbugs.charsets.UserTextFile類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。