private static void freq(File file) throws Exception { //t@C=eretweetƂɓxz쐬o
		InputStreamReader isr = new InputStreamReader(new FileInputStream(file));
		BufferedReader br = new BufferedReader(isr);
		String head = br.readLine(); //擪s(URL)
		
		int max = 0;
		int min = Integer.MAX_VALUE;
		
		HashMap<Integer, Integer> logMap = new HashMap<Integer, Integer>();
		String line = new String();
		int key;
		while((line = br.readLine()) != null) {
			StringTokenizer st = new StringTokenizer(line, ",");
			int lineInt = Integer.parseInt(st.nextToken());

			key = lineInt/pitch;
			if (key > max) max = key;
			if (key < min) min = key;
			int value;
			if (logMap.containsKey(key)) {
				value = logMap.get(key);
				value++;
				logMap.put(key, value);
			} else {
				logMap.put(key, 1);
			}
		}
		br.close();
		isr.close();
			
		File outFile = new File(file.getPath().replaceFirst("\\.csv", "\\.freq.csv"));
		OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(outFile));
		BufferedWriter bw = new BufferedWriter(osw);
		if (outFile.length() == 0) {
			bw.write(head);
			bw.newLine();
			bw.write("Min = ," + min*pitch + ", Max = ," + max*pitch); //Ot`pMin-Max𖾋LĂ
			bw.newLine();
		}
		for (int i = min; i <= max; i++) {
			if (logMap.containsKey(i)) bw.write(String.format("%d,%d", i*pitch, logMap.get(i)));
			else bw.write(String.format("%d,%d", i*pitch, 0));
			bw.newLine();
		}
		System.out.println("Complete: " + outFile.getName());
		bw.close();
		osw.close();		
		
	}