Java 一些少见的使用方法
Rollback.Website rw = (Rollback.Website)wbList.get(status.getDomainDir());
if(rw==null){
rw = rollback.new Website();
}
int res = new CrawlDb().doMain(NutchConfiguration.create(), args);
以下是 PathFilter() 是一个接口, 以下显示的是不需要 class 就可以使用了.
Path[] paths = fs.listPaths(new Path(args[++i]), new PathFilter() { public boolean accept(Path dir) { try { return fs.isDirectory(dir); } catch (IOException ioe) { return false; } } });