|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.io.Reader
java.io.FilterReader
public abstract class FilterReader
用于读取已过滤的字符流的抽象类。抽象类 FilterReader 自身提供了一些将所有请求传递给所包含的流的默认方法。FilterReader 的子类应重写这些方法中的一些方法,并且还可以提供一些额外的方法和字段。
| 字段摘要 | |
|---|---|
protected Reader |
in
底层字符输入流。 |
| 从类 java.io.Reader 继承的字段 |
|---|
lock |
| 构造方法摘要 | |
|---|---|
protected |
FilterReader(Reader in)
创建一个新的 filtered reader。 |
| 方法摘要 | |
|---|---|
void |
close()
关闭该流并释放与之关联的所有资源。 |
void |
mark(int readAheadLimit)
在流中的当前位置上作标记。 |
boolean |
markSupported()
判断此流是否支持 mark() 操作。 |
int |
read()
读取单个字符。 |
int |
read(char[] cbuf,
int off,
int len)
将字符读入数组的某一部分。 |
boolean |
ready()
判断此流是否已经准备好用于读取。 |
void |
reset()
重置该流。 |
long |
skip(long n)
跳过某些字符。 |
| 从类 java.io.Reader 继承的方法 |
|---|
read, read |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected Reader in
| 构造方法详细信息 |
|---|
protected FilterReader(Reader in)
in - 提供底层流的 Reader 对象。
NullPointerException - 如果 in 为 null| 方法详细信息 |
|---|
public int read()
throws IOException
Reader 中的 readIOException - 如果发生 I/O 错误
public int read(char[] cbuf,
int off,
int len)
throws IOException
Reader 中的 readcbuf - 目标缓冲区off - 开始存储字符处的偏移量len - 要读取的最多字符数
IOException - 如果发生 I/O 错误
public long skip(long n)
throws IOException
Reader 中的 skipn - 要跳过的字符数
IOException - 如果发生 I/O 错误
public boolean ready()
throws IOException
Reader 中的 readyIOException - 如果发生 I/O 错误public boolean markSupported()
Reader 中的 markSupported
public void mark(int readAheadLimit)
throws IOException
Reader 中的 markreadAheadLimit - 在仍保留该标记的情况下,对可读取字符数量的限制。在读取这样多的字符后,尝试重置流可能会失败。
IOException - 如果发生 I/O 错误
public void reset()
throws IOException
Reader 中的 resetIOException - 如果发生 I/O 错误
public void close()
throws IOException
Reader 复制的描述
Closeable 中的 closeReader 中的 closeIOException - 如果发生 I/O 错误
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。