public int read(byte[] b,
int off,
int len)
throws IOException
Reads up to len bytes of data from this input stream into an array of bytes. This method blocks until some input is available. b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read. 从当前的流中读字节到字节数组里。是从当前缓冲区中读数据,缓冲区的大小一定,off-指定一个开始读取数据的地址
int off,
int len)
throws IOException
Reads up to len bytes of data from this input stream into an array of bytes. This method blocks until some input is available. b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read. 从当前的流中读字节到字节数组里。是从当前缓冲区中读数据,缓冲区的大小一定,off-指定一个开始读取数据的地址
这个参数表示读入的byte保存在数组的第几个位置开始
seek(position)