如题。如何用不同的字符集重写文件?
在哪里可以找到可用的编码 - 最终静态整数?
FileInputStream fis = new FileInputStream(inputFile);
InputStreamReader isr = new InputStreamReader(fis, inputEncoding);
BufferedReader in = new BufferedReader(isr);
FileOutputStream fos = new FileOutputStream(outputFile);
OutputStreamWriter osw = new OutputStreamWriter(fos, outputEncoding);
BufferedWriter out = new BufferedWriter(osw);
String line = in.readLine();
out.write(line);