public interface InputStreamNio
| 限定符和类型 | 方法和说明 |
|---|---|
int |
available()
当前马上可读取的数据(很可能是0)
|
void |
close()
关闭流
|
InputStreamNio |
duplicate()
产生同样内容的副本流,与主体读取互不影响
|
int |
read(byte[] buffer,
int off,
int len)
读取
|
int |
read(ByteBuffer dst)
读取
|
int read(ByteBuffer dst) throws IOException
dst - 读取到的缓冲区IOExceptionint read(byte[] buffer,
int off,
int len)
throws IOException
buffer - 缓冲区off - 缓冲区开始位置len - 缓冲区的空间IOExceptionint available()
throws IOException
IOExceptionvoid close()
throws IOException
IOExceptionInputStreamNio duplicate() throws IOException
IOExceptionCopyright © 2020. All rights reserved.