类 java.io.FilterWriter
java.lang.Object
|
+----java.io.Writer
|
+----java.io.FilterWriter
- public abstract class FilterWriter
- extends Writer
输出过滤后的字符流的抽象类。
变量索引
- out
- 基本字符输出流。
构造子索引
- FilterWriter(Writer)
- 创建一个新的过滤器书写者。
方法索引
- close()
- 关闭流。
- flush()
- 刷新流。
- write(char[], int, int)
- 将若干字符写入一个数组中。
- write(int)
- 写入单一字符。
- write(String, int, int)
- 写入一串的某部分。
变量
out
protected Writer out
- 基本字符输出流。
构造子
FilterWriter
protected FilterWriter(Writer out)
- 创建一个新的过滤器书写者。
方法
write
public void write(int c) throws IOException
- 写入单一字符。
- 抛出:
IOException
- 如果发生一 I/O 错误。
- 覆盖:
- 类
Writer 中的 write
write
public void write(char cbuf[],
int off,
int len) throws IOException
- 将若干字符写入一个数组中。
- 参数:
- cbuf - 待写入的字符缓冲
- off - 开始读取字符的偏移量
- len - 待写入的字节数
- 抛出:
IOException
- 如果发生一 I/O 错误。
- 覆盖:
- 类
Writer
中的
write
write
public void write(String str,
int off,
int len) throws IOException
- 写入一串的某部分。
- 参数:
- str - 写入串
- off - 开始读取字符的偏移量
- len - 待写入的字节数
- 抛出:
IOException
- 如果发生一 I/O 错误。
- 覆盖:
- 类 Writer
中的
write
flush
public void flush() throws IOException
- 刷新流。
- 抛出:
IOException
- 如果发生一 I/O 错误。
- 覆盖:
- 类
Writer 中的 flush
close
public void close() throws IOException
- 关闭流。
- 抛出:
IOException
- 如果发生一 I/O 错误。
- 覆盖:
- 类
Writer 中的 close