public class DynamicCompositeByteBufInputStream extends InputStream implements DataInput
InputStream which reads data from a DynamicCompositeByteBuf.
A read operation against this stream will occur at the readerIndex
of its underlying buffer and the readerIndex will increase during
the read operation. Please note that it only reads up to the number of
readable bytes of its underlying buffer.
This stream implements DataInput for your convenience.
| 构造器和说明 |
|---|
DynamicCompositeByteBufInputStream(DynamicCompositeByteBuf compositeByteBuf)
Creates a new stream which reads data from the specified
buffer |
DynamicCompositeByteBufInputStream(DynamicCompositeByteBuf buffer,
boolean releaseOnClose)
Creates a new stream which reads data from the specified
buffer |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
available() |
void |
close() |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt() |
String |
readLine() |
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
String |
readUTF() |
long |
skip(long n) |
int |
skipBytes(int n) |
mark, read, resetpublic DynamicCompositeByteBufInputStream(DynamicCompositeByteBuf compositeByteBuf)
buffercompositeByteBuf - The buffer which provides the content for this InputStream.public DynamicCompositeByteBufInputStream(DynamicCompositeByteBuf buffer, boolean releaseOnClose)
bufferbuffer - The buffer which provides the content for this InputStream.releaseOnClose - true means that when close() is called
then DynamicCompositeByteBuf.release()
will be called on buffer.public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 InputStreamIOExceptionpublic int available()
throws IOException
available 在类中 InputStreamIOExceptionpublic boolean markSupported()
markSupported 在类中 InputStreampublic int read()
throws IOException
read 在类中 InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read 在类中 InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip 在类中 InputStreamIOExceptionpublic int skipBytes(int n)
throws IOException
skipBytes 在接口中 DataInputIOExceptionpublic boolean readBoolean()
throws IOException
readBoolean 在接口中 DataInputIOExceptionpublic byte readByte()
throws IOException
readByte 在接口中 DataInputIOExceptionpublic char readChar()
throws IOException
readChar 在接口中 DataInputIOExceptionpublic double readDouble()
throws IOException
readDouble 在接口中 DataInputIOExceptionpublic float readFloat()
throws IOException
readFloat 在接口中 DataInputIOExceptionpublic void readFully(byte[] b)
throws IOException
readFully 在接口中 DataInputIOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws IOException
readFully 在接口中 DataInputIOExceptionpublic int readInt()
throws IOException
readInt 在接口中 DataInputIOExceptionpublic String readLine() throws IOException
readLine 在接口中 DataInputIOExceptionpublic long readLong()
throws IOException
readLong 在接口中 DataInputIOExceptionpublic short readShort()
throws IOException
readShort 在接口中 DataInputIOExceptionpublic String readUTF() throws IOException
readUTF 在接口中 DataInputIOExceptionpublic int readUnsignedByte()
throws IOException
readUnsignedByte 在接口中 DataInputIOExceptionpublic int readUnsignedShort()
throws IOException
readUnsignedShort 在接口中 DataInputIOExceptionCopyright © 2019 Baidu, Inc.. All rights reserved.