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.