private class SimpleBufferAllocator.SimpleBuffer extends AbstractIoBuffer
| Modifier and Type | Field and Description |
|---|---|
private java.nio.ByteBuffer |
buf |
| Modifier | Constructor and Description |
|---|---|
protected |
SimpleBuffer(java.nio.ByteBuffer buf) |
protected |
SimpleBuffer(SimpleBufferAllocator.SimpleBuffer parent,
java.nio.ByteBuffer buf) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
array() |
int |
arrayOffset() |
protected IoBuffer |
asReadOnlyBuffer0()
Implement this method to return the unexpandable read only version of
this buffer.
|
java.nio.ByteBuffer |
buf()
Returns the underlying NIO buffer instance.
|
protected void |
buf(java.nio.ByteBuffer buf)
Sets the underlying NIO buffer instance.
|
protected IoBuffer |
duplicate0()
Implement this method to return the unexpandable duplicate of this
buffer.
|
void |
free()
Declares this buffer and all its derived buffers are not used anymore so
that it can be reused by some
IoBufferAllocator implementations. |
boolean |
hasArray() |
protected IoBuffer |
slice0()
Implement this method to return the unexpandable slice of this
buffer.
|
asCharBuffer, asDoubleBuffer, asFloatBuffer, asInputStream, asIntBuffer, asLongBuffer, asOutputStream, asReadOnlyBuffer, asShortBuffer, capacity, capacity, clear, compact, compareTo, duplicate, equals, expand, expand, fill, fill, fillAndReset, fillAndReset, flip, get, get, get, get, getChar, getChar, getDouble, getDouble, getEnum, getEnum, getEnumInt, getEnumInt, getEnumSet, getEnumSet, getEnumSetInt, getEnumSetInt, getEnumSetLong, getEnumSetLong, getEnumSetShort, getEnumSetShort, getEnumShort, getEnumShort, getFloat, getFloat, getHexDump, getHexDump, getInt, getInt, getLong, getLong, getMediumInt, getMediumInt, getObject, getObject, getPrefixedString, getPrefixedString, getShort, getShort, getSlice, getSlice, getString, getString, getUnsigned, getUnsigned, getUnsignedInt, getUnsignedInt, getUnsignedMediumInt, getUnsignedMediumInt, getUnsignedShort, getUnsignedShort, hashCode, hasRemaining, indexOf, isAutoExpand, isAutoShrink, isDerived, isDirect, isReadOnly, limit, limit, mark, markValue, minimumCapacity, minimumCapacity, order, order, position, position, prefixedDataAvailable, prefixedDataAvailable, put, put, put, put, put, put, putChar, putChar, putDouble, putDouble, putEnum, putEnum, putEnumInt, putEnumInt, putEnumSet, putEnumSet, putEnumSetInt, putEnumSetInt, putEnumSetLong, putEnumSetLong, putEnumSetShort, putEnumSetShort, putEnumShort, putEnumShort, putFloat, putFloat, putInt, putInt, putLong, putLong, putMediumInt, putMediumInt, putObject, putPrefixedString, putPrefixedString, putPrefixedString, putPrefixedString, putShort, putShort, putString, putString, putUnsigned, putUnsigned, putUnsigned, putUnsigned, putUnsigned, putUnsigned, putUnsigned, putUnsigned, putUnsignedInt, putUnsignedInt, putUnsignedInt, putUnsignedInt, putUnsignedInt, putUnsignedInt, putUnsignedInt, putUnsignedInt, putUnsignedShort, putUnsignedShort, putUnsignedShort, putUnsignedShort, putUnsignedShort, putUnsignedShort, putUnsignedShort, putUnsignedShort, remaining, reset, rewind, setAutoExpand, setAutoShrink, shrink, skip, slice, sweep, sweep, toStringallocate, allocate, getAllocator, isUseDirectBuffer, normalizeCapacity, setAllocator, setUseDirectBuffer, wrap, wrap, wrapprotected SimpleBuffer(java.nio.ByteBuffer buf)
protected SimpleBuffer(SimpleBufferAllocator.SimpleBuffer parent, java.nio.ByteBuffer buf)
public java.nio.ByteBuffer buf()
IoBufferprotected void buf(java.nio.ByteBuffer buf)
AbstractIoBufferbuf in class AbstractIoBufferbuf - The buffer to store within this IoBufferprotected IoBuffer duplicate0()
AbstractIoBufferduplicate0 in class AbstractIoBufferprotected IoBuffer slice0()
AbstractIoBufferslice0 in class AbstractIoBufferprotected IoBuffer asReadOnlyBuffer0()
AbstractIoBufferasReadOnlyBuffer0 in class AbstractIoBufferpublic int arrayOffset()
arrayOffset in class IoBufferByteBuffer.arrayOffset()public boolean hasArray()
public void free()
IoBufferIoBufferAllocator implementations.
It is not mandatory to call this method, but you might want to invoke
this method for maximum performance.