FilterInputStream
简述
继承自InputStream,实现接口Closeable, AutoCloseable。
成员:InputStream in使用volatile修饰
由于该方法全部会使用类java.io.InputStream,所以推荐先看关于InputStream的api或我写的关于InputStream的介绍
函数
构造函数:FilterInputStream(InputStream in),使用protected修饰
protected FilterInputStream(InputStream in) {
this.in = in;
}
函数:
int read()
在输入流读取指针所指下一个字节,并将指针移动到该字节上。字节值以int形式返回。如果没有可用的字节,因为已经到达了流的末端,则返回值-1。此方法会阻塞数据流,如果检测到阻塞会返回IOException。
public int read() throws IOException {
return in.read();
}