package joeho.net.csdn.blog.io;
import java.io.*;
import java.nio.*;
public class FileWriterReader {
/**
* Method main
*
*
* @param args
*
*/
public static void main(String[] args) throws Exception {
FileWriter fw = new FileWriter("Hello2.txt");
fw.write("http://hi.csdn.net/joeho");
fw.flush();
CharBuffer cbuff = CharBuffer.allocate(1024);
FileReader fr = new FileReader("Hello2.txt");
fr.read(cbuff);
System.out.println(new String(cbuff.array()));
fr.close();
}
}