日期:2014-05-19 浏览次数:20986 次
BufferedReader buf = new BufferedReader(new InputStreamReader(new FileInputStream("e://test.xxx"), "UTF-8")); String line = null; int i = 0; while ((line = buf.readLine()) != null) { if (i == 0) { line = line.substring(1);// 去掉文件头 i++; } String[] testString = line.split(","); for (int j = 0; j < testString.length; j++) { System.out.print(testString[j]+" "); } System.out.println(); } buf.close();