private int readAsSAX(final int[] cnts, int err, final File[] arr) throws IOException, FileNotFoundException {
class H extends Handler {
int cnt;
public void publish(LogRecord record) {
cnt++;
}
public void flush() {
}
public void close() throws SecurityException {
}
}
int i = -1;
for (File f : arr) {
LOG.log(Level.WARNING, "scanning {0}", f.getPath());
i++;
InputStream is = new BufferedInputStream(new FileInputStream(f));
H h = new H();
try {
LogRecords.scan(is, h);
} catch (IOException ex) {
LOG.log(Level.WARNING, null, ex);
err++;
continue;
} finally {
is.close();
}
assertEquals("The same amount for " + f, h.cnt, cnts[i]);
}
return err;
}
ReadBigDataTest.java 文件源码
java
阅读 40
收藏 0
点赞 0
评论 0
项目:incubator-netbeans
作者:
评论列表
文章目录