标签:
package ketang82;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
public class WriteBYtrStream {
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
FileOutputStream foStream = new FileOutputStream("textw.txt");
String outstring = "write 123455写出数据";
byte output []= outstring.getBytes("UTF-8");
foStream.write(output);
foStream.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
java/IO流FileOutputStream写入文档数据
标签:
原文地址:http://www.cnblogs.com/fanfengzi/p/5735056.html