瓜西西

导航

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;
    }
  }
});

posted on 2012-09-05 11:15  瓜西西  阅读(201)  评论(0)    收藏  举报