最好的途径是在读取文件时,就设置好格式。例子程序如下: try { [color=darkred] BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(fileChooser.getSelectedFile()),"gb2312"));[/color] String line; while ((line = reader.readLine()) != null) { ... ... } }...