@@ -0,0 +1,871 @@
+%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.FileReader;%0Aimport java.util.HashSet;%0Aimport java.util.Iterator;%0Aimport java.util.Map;%0Aimport java.util.TreeMap;%0A%0A%0Apublic class CountTotalDocuments %7B%0A%09%0A%09public static void main(String args%5B%5D)%0A%09%7B%0A%09%09TreeMap%3CString, Integer%3E map = new TreeMap%3CString, Integer%3E();%0A%09%09HashSet%3CString%3E set = new HashSet%3CString%3E();%0A%09%09int count = 0, totalURLs = 0;%0A%09%09while(count++%3C99) %7B%0A%09%09try %7B%09%0A%09%09String filename = %22D:%5C%5Ccrawlstorage%5C%5Cdatafile%22 + Integer.toString(count+1)  + %22.xml%22;  %0A%09%09String str = null, url = null;;%0A%09%09BufferedReader br = new BufferedReader(new FileReader(filename));%0A%09%09%0A%09%09while((str=br.readLine())!=null)%0A%09%09%0A%09%09%7B%0A%09%09%09if(str.startsWith(%22%3Curl%3E%22)) %0A%09%09%09%7B%0A%09%09%09%09url = str.substring(5, str.length()-6); %0A%09%09%09%09set.add(url);%0A%09%09%09%7D%0A%09%09%0A%09%09%7D%0A%09%09%0A%09%7D%0A%09catch(Exception e) %0A%09%7B e.printStackTrace(); %7D%09%0A%09%09%0A%09%7D%0A%09%09%0A%09%0A%09System.out.println(set.size());%0A%09%7D%0A%0A%7D%0A

Create CountTotalDocuments.java