1 8 public int available throws IOException public
Sign up to view full document!
SIGN UP
• • • 1 -8 public int available() throws IOException获取可以从此输入流读取(或跳过)的 字节数 public void close() throws IOException关闭输入流,同时释放系统资源 public void mark(int readlimit)在输入流中标记位置,参数readlimit为位置参数 public boolean mark. Supported()用于测试该输入流是否支持mark和reset方法 public abstract int read() throws IOException从输入流中读取下一个数据字节 public int read(byte[] b) throws IOException从输入流中读取字节数据,并存入字 节数组b中 public int read(byte[] b, int off, int len) throws IOException从输入流中读取len个数 据字节,并存入字节数组b中 public void reset() throws IOException将此流重新定位到最后一次调用mark方法 时所处的位置 public long skip(long n) throws IOException跳过并且放弃输入流中的n个字节数 据 使用Input. Stream类是可能发生IOException异常的,所以在使用时是要进行异常 处理的。 不怕人家说缺点,才会不断进步。—谷姐网(goojje. com)
- Slides: 23