@@ -0,0 +1,922 @@
+package OutPut;%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Aimport com.csvreader.CsvWriter;%0A%0Apublic class CSVOperation %7B%0A%0A%0A%09public static void writeHitRate(String time, double hitrate)%0A%09%7B%0A%09%09String output = %22hitRate.csv%22;%0A%09%09boolean alreadyExists = new File(output).exists();%0A%0A%09%09try %7B%0A%09%09%09CsvWriter csvOutput = new CsvWriter(output);%0A%0A%09%09%09// if the file didn't already exist then we need to write out the header line%0A%09%09%09if (!alreadyExists)%0A%09%09%09%7B%0A%09%09%09%09csvOutput.write(%22time%22);%0A%09%09%09%09csvOutput.write(%22hitRate%22);%0A%09%09%09%09csvOutput.endRecord();%0A%09%09%09%7D%0A%09%09%09// else assume that the file already has the correct header line%0A%09%09%09// write out record%0A%09%09%09csvOutput.write(time);%0A%09%09%09csvOutput.write(Double.toString(hitrate));%0A%09%09%09csvOutput.endRecord();%0A%09%09%09csvOutput.close();%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%0A%09%7D%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09writeHitRate(%222010-10-10 00:00:00~2011-10-10 00:00:00%22, 0.6);%0A%09%7D%0A%7D

add a cvs operation file for write results to a csv file