public class BufferedData extends ExpandableBuffer
ByteBuffer.
This class is not thread safe.
ExpandableBuffer.Mode| 限定符 | 构造器和说明 |
|---|---|
protected |
BufferedData(int bufferSize) |
| 限定符和类型 | 方法和说明 |
|---|---|
static BufferedData |
allocate(int bufferSize) |
int |
capacity()
Returns available capacity of this buffer.
|
void |
clear()
Clears buffer.
|
ByteBuffer |
data() |
boolean |
hasData()
Determines if the buffer contains data.
|
int |
length()
Returns the length of this buffer.
|
void |
put(ByteBuffer src) |
int |
readFrom(ReadableByteChannel channel) |
int |
writeTo(WritableByteChannel dst) |
buffer, ensureAdjustedCapacity, ensureCapacity, expand, mode, setInputMode, setOutputMode, toStringpublic static BufferedData allocate(int bufferSize)
public final boolean hasData()
ExpandableBufferSets the mode to output.
hasData 在类中 ExpandableBuffertrue if there is data in the buffer,
false otherwise.public final int length()
ExpandableBufferSets the mode to output.
length 在类中 ExpandableBufferpublic final int capacity()
ExpandableBuffercapacity 在类中 ExpandableBufferpublic final void clear()
ExpandableBufferSets the mode to input.
clear 在类中 ExpandableBufferpublic final void put(ByteBuffer src)
public final int readFrom(ReadableByteChannel channel) throws IOException
IOExceptionpublic final int writeTo(WritableByteChannel dst) throws IOException
IOExceptionpublic final ByteBuffer data()
Copyright © 2023. All rights reserved.