longstart=newDate().getTime(); int numIndexed = index(indexDir, dataDir); longend=newDate().getTime();
System.out.println("Indexing "+ numIndexed +" files took " +(end-start)+" milliseconds"); }
publicstaticint index(File indexDir,File dataDir)throwsException { if(!dataDir.exists()||!dataDir.isDirectory()) { System.out.println("dataDir is not exist or not a directory"); return-1; }