public class ByteBufferInputStream extends InputStream implements InputStreamNio
| 构造器和说明 |
|---|
ByteBufferInputStream(ByteBuffer buffer) |
| 限定符和类型 | 方法和说明 |
|---|---|
InputStreamNio |
duplicate()
产生同样内容的副本流,与主体读取互不影响
|
int |
read() |
int |
read(byte[] b,
int off,
int len)
读取
|
int |
read(ByteBuffer dst)
读取
|
available, close, mark, markSupported, read, reset, skipclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitavailable, closepublic ByteBufferInputStream(ByteBuffer buffer)
public int read(ByteBuffer dst) throws IOException
InputStreamNioread 在接口中 InputStreamNiodst - 读取到的缓冲区IOException - IO异常时抛出public int read(byte[] b,
int off,
int len)
throws IOException
InputStreamNioread 在接口中 InputStreamNioread 在类中 InputStreamb - 缓冲区off - 缓冲区开始位置len - 缓冲区的空间IOException - IO异常时抛出public int read()
throws IOException
read 在类中 InputStreamIOExceptionpublic InputStreamNio duplicate() throws IOException
InputStreamNioduplicate 在接口中 InputStreamNioIOException - IO异常时抛出Copyright © 2021. All rights reserved.