java_25.1字节转为字符OutputStreamWriter
public class Demo { public static void main(String[] args){ try { FileOutputStream fos = new FileOutputStream("d:\\aaa.txt"); OutputStreamWriter sow = new OutputStreamWriter(fos,"UTF-8"); sow.write("hello world"); sow.close(); }catch(Exception e){ e.printStackTrace(); } } }