
锦州网站制作公司哪家好,找成都创新互联!从网页设计、网站建设、微信开发、APP开发、成都响应式网站建设公司等网站项目制作,到程序开发,运营维护。成都创新互联于2013年创立到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选成都创新互联。
java.lang.Object
|---java.io.Writer
|---|---java.io.FilterWriter
public abstract class FilterWriter
extends Writer
用于编写过滤字符流的抽象类。 抽象类 FilterWriter 本身提供了将所有请求传递给包含的流的默认方法。 FilterWriter 的子类应该覆盖其中的一些方法,并且还可以提供额外的方法和字段。
Since:
JDK1.1
| 修饰符和类型 | 字段 | 描述 |
|---|---|---|
| protected Writer | out | 底层字符输出流。 |
| 从类 java.io.Writer 继承的字段 |
|---|
| lock |
| 修饰符 | 构造函数 | 描述 |
|---|---|---|
| protected | FilterWriter(Writer out) | 创建一个新的过滤 writer。 |
| 修饰符和类型 | 方法 | 描述 |
|---|---|---|
| void | close() | 关闭流,首先刷新它。 |
| void | flush() | 冲洗流。 |
| void | write(char[] cbuf, int off, int len) | 写入字符数组的一部分。 |
| void | write(int c) | 写入单个字符。 |
| void | write(String str, int off, int len) | 写入字符串的一部分。 |
| 从类 java.lang.Object 继承的方法 |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 从类 java.io.Writer 继承的方法 |
|---|
| append, append, append, write, write |
protected Writer out
底层字符输出流。
protected FilterWriter(Writer out)
创建一个新的过滤 writer。
参数:
| 参数名称 | 参数描述 |
|---|---|
| out | 提供底层流的 Writer 对象。 |
Throws:
| Throw名称 | Throw描述 |
|---|---|
| NullPointerException | 如果 out 为空 |
public void write(int c) throws IOException
写入单个字符。
覆盖:
在 Writer 类中写
参数:
| 参数名称 | 参数描述 |
|---|---|
| c | int 指定要写入的字符 |
Throws:
| Throw名称 | Throw描述 |
|---|---|
| IOException | 如果发生 I/O 错误 |
public void write(char[] cbuf, int off, int len) throws IOException
写入字符数组的一部分。
指定者:
在 Writer 类中写
参数:
| 参数名称 | 参数描述 |
|---|---|
| cbuf | 要写入的字符缓冲区 |
| off | 开始读取字符的偏移量 |
| len | 要写入的字符数 |
Throws:
| Throw名称 | Throw描述 |
|---|---|
| IOException | 如果发生 I/O 错误 |
public void write(String str, int off, int len) throws IOException
写入字符串的一部分。
覆盖:
在 Writer 类中写
参数:
| 参数名称 | 参数描述 |
|---|---|
| str | 要写入的字符串 |
| off | 开始读取字符的偏移量 |
| len | 要写入的字符数 |
Throws:
| Throw名称 | Throw描述 |
|---|---|
| IOException | 如果发生 I/O 错误 |
public void flush() throws IOException
冲洗流。
指定者:
在接口 Flushable 中刷新
指定者:
在 Writer 类中刷新
Throws:
| Throw名称 | Throw描述 |
|---|---|
| IOException | 如果发生 I/O 错误 |
public void close() throws IOException
从班级复制的描述:Writer
关闭流,首先刷新它。 一旦流被关闭,进一步的 write() 或 flush() 调用将导致抛出 IOException。 关闭以前关闭的流没有效果。
指定者:
在接口 AutoCloseable 中关闭
指定者:
在接口Closeable中关闭
指定者:
close in class Writer
Throws:
| Throw名称 | Throw描述 |
|---|---|
| IOException | 如果发生 I/O 错误 |