@Test
	public void urlCount() {
		Path path = Paths.get("D:\\\\Download\\SecureCRT\\logs");
		File[] files = path.toFile().listFiles();
		System.out.println(Arrays.toString(files));
		
		String dateStr = "26/Apr";
		String line = null;
		Map<String, Integer> count = new HashMap<String, Integer>();
		
//		for (int i=0; i<4; i++) {
		for (int i=0; i<files.length; i++) {
			int lineNum = 0;
			System.out.println("start:" + files[i].getName());
			try (FileInputStream fis = new FileInputStream(files[i]);
					GZIPInputStream gzis = new GZIPInputStream(fis);
					InputStreamReader isr = new InputStreamReader(gzis);
					BufferedReader br = new BufferedReader(isr)) {
				while ((line = br.readLine()) != null) {
					lineNum ++;
					String[] strings =line.split(" ");
					if (strings.length != 13) {
						System.out.printf("error:num:%s | content:%s.\n", lineNum, line);
					} else {
						if (strings[3].contains(dateStr)) {
							String url = strings[7];
							//这里可能需要换一种更好的方式
							if (url.contains("?")) {
								url = url.substring(0, url.indexOf("?"));
							}
							Integer c = count.get(url);
							if (c == null) {
								count.put(url, 1);
							} else {
								count.put(url, c + 1);
							}
						} 
					}
				}
			} catch (IOException e) {
				e.printStackTrace();
			} 
		}
		
		System.out.println("=============统计结果=============");
		for (Map.Entry<String, Integer> entry : count.entrySet()) {
			System.out.println(entry.getValue() + "\t" + entry.getKey());
		}
	}