AJPFX总结FileWriter类的write方法

Posted on 2019-05-14 13:13  AJPFX  阅读(189)  评论(0编辑  收藏  举报

FileWriter从类OutputStreamWriter继承的


1、public void write(int c)
          throws IOException写入单个字符。
          c - 指定要写入字符的ASCII。


2、public void write(char[] cbuf, int off, int len)
          throws IOException写入字符数组的某一部分


3、public void write(String str,  int off,  int len)
          throws IOException写入字符串的某一部分。

FileWriter从类Writer继承的


1、public void write(char[] cbuf)
          throws IOException写入字符数组。


2、public abstract void write(char[] cbuf,  int off, int len)
          throws IOException写入字符数组的某一部分

Copyright © 2024 AJPFX
Powered by .NET 8.0 on Kubernetes