package com.wyq.file;
import java.io.FileOutputStream;
import java.io.PrintWriter;
public class TestPrintStream {
public static void main(String[] args) throws Exception {
// Writer w = new PrintWriter("d:/a.txt");
// PrintWriter w = new PrintWriter("d:/a.txt");
// PrintWriter w = new PrintWriter(new FileOutputStream("d:/a.txt"),false);
PrintWriter w = new PrintWriter("d:/a.txt","gbk");
w.write("你好啊。。。");
w.flush();
w.write(24);
w.flush();
w.write('c');
char ch [] = new char [] {'1','a','2','c'};
w.write(ch, 0, ch.length);
w.close();
System.out.println("fajlkjdalksjgfdlk");
}
}