`
qq44056919
  • 浏览: 47991 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

IO流的操作

    博客分类:
  • Java
阅读更多
IO流的操作.


public static void main(String[] args) throws IOException {

StringBuffer text = new StringBuffer("Hello File");
byte[] b = text.toString().getBytes();
File f = new File("d:\\text.xml");
f.createNewFile();
FileOutputStream fos = new FileOutputStream(f);
fos.write(b);
fos.close();
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics