public abstract class FilterWriter extends Writer
FilterWriter本身提供了默认的方法,通过所有要求的载流。子
FilterWriter应重写这些方法,还可以提供额外的方法和字段。
| Modifier | Constructor and Description |
|---|---|
protected |
FilterWriter(Writer out)
创建一个新的筛选的作者。
|
protected Writer out
protected FilterWriter(Writer out)
out——作家对象提供基础流。
null
out
NullPointerException
public void write(int c)
throws IOException
write 方法重写,继承类
Writer
c - int指定要写入的字符
IOException如果I/O错误发生
public void write(char[] cbuf,
int off,
int len)
throws IOException
write 方法重写,继承类
Writer
cbuf Buffer字要写
off偏移开始读取字符的
len数字要写
IOException如果I/O错误发生
public void write(String str, int off, int len) throws IOException
write 方法重写,继承类
Writer
str字符串被写入
off偏移开始读取字符的
len数字要写
IOException如果I/O错误发生
public void flush()
throws IOException
flush 接口
Flushable
flush 方法重写,继承类
Writer
IOException如果I/O错误发生
public void close()
throws IOException
Writer
close 接口
Closeable
close 接口
AutoCloseable
close 方法重写,继承类
Writer
IOException如果I/O错误发生
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.