您的位置:首页 > 编程语言 > PHP开发

OutputStream

2015-12-05 23:16 651 查看
import java.io.*;
public class OutputStr
{
public static void main(String[] args) throws Exception
{
File file = new File("D:\\temp","write.txt");
OutputStream os = new FileOutputStream(file);
//    os.write(89); //参数是 int类型
String str = "haahahahah";
os.write(str.getBytes());
os.flush();//清空缓存
os.close();
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: