本文整理匯總了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);
}
}
示例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));
}
示例3: readFromStandardInput
import edu.umd.cs.findbugs.charsets.UserTextFile; //導入依賴的package包/類
public static List<String> readFromStandardInput() throws IOException {
return readFrom(UserTextFile.reader(System.in));
}