public abstract class BaseByteBuffer extends ByteBuffer
ByteBuffer. This implementation
assumes that ByteBuffer.buf() always returns a correct NIO
ByteBuffer instance. Most implementations could
extend this class and implement their own buffer management mechanism.ByteBufferAllocator| 限定符 | 构造器和说明 |
|---|---|
protected |
BaseByteBuffer() |
| 限定符和类型 | 方法和说明 |
|---|---|
java.nio.CharBuffer |
asCharBuffer() |
java.nio.DoubleBuffer |
asDoubleBuffer() |
java.nio.FloatBuffer |
asFloatBuffer() |
java.nio.IntBuffer |
asIntBuffer() |
java.nio.LongBuffer |
asLongBuffer() |
java.nio.ShortBuffer |
asShortBuffer() |
int |
capacity() |
ByteBuffer |
capacity(int newCapacity)
Changes the capacity of this buffer.
|
protected abstract void |
capacity0(int newCapacity)
Implement this method to increase the capacity of this buffer.
|
ByteBuffer |
clear() |
ByteBuffer |
compact() |
ByteBuffer |
expand(int pos,
int expectedRemaining)
Changes the capacity and limit of this buffer so this buffer get
the specified expectedRemaining room from the specified
pos.
|
ByteBuffer |
flip() |
byte |
get() |
ByteBuffer |
get(byte[] dst,
int offset,
int length) |
byte |
get(int index) |
char |
getChar() |
char |
getChar(int index) |
double |
getDouble() |
double |
getDouble(int index) |
float |
getFloat() |
float |
getFloat(int index) |
int |
getInt() |
int |
getInt(int index) |
long |
getLong() |
long |
getLong(int index) |
short |
getShort() |
short |
getShort(int index) |
boolean |
isAutoExpand()
Returns true if and only if autoExpand is turned on.
|
boolean |
isDirect() |
boolean |
isReadOnly() |
int |
limit() |
ByteBuffer |
limit(int newLimit) |
ByteBuffer |
mark() |
int |
markValue()
Returns the position of the current mark.
|
java.nio.ByteOrder |
order() |
ByteBuffer |
order(java.nio.ByteOrder bo) |
int |
position() |
ByteBuffer |
position(int newPosition) |
ByteBuffer |
put(byte b) |
ByteBuffer |
put(byte[] src,
int offset,
int length) |
ByteBuffer |
put(java.nio.ByteBuffer src)
Writes the content of the specified src into this buffer.
|
ByteBuffer |
put(int index,
byte b) |
ByteBuffer |
putChar(char value) |
ByteBuffer |
putChar(int index,
char value) |
ByteBuffer |
putDouble(double value) |
ByteBuffer |
putDouble(int index,
double value) |
ByteBuffer |
putFloat(float value) |
ByteBuffer |
putFloat(int index,
float value) |
ByteBuffer |
putInt(int value) |
ByteBuffer |
putInt(int index,
int value) |
ByteBuffer |
putLong(int index,
long value) |
ByteBuffer |
putLong(long value) |
ByteBuffer |
putShort(int index,
short value) |
ByteBuffer |
putShort(short value) |
ByteBuffer |
reset() |
ByteBuffer |
rewind() |
ByteBuffer |
setAutoExpand(boolean autoExpand)
Turns on or off autoExpand.
|
acquire, allocate, allocate, array, arrayOffset, asInputStream, asOutputStream, asReadOnlyBuffer, autoExpand, autoExpand, buf, compareTo, duplicate, equals, expand, fill, fill, fillAndReset, fillAndReset, get, getAllocator, getHexDump, getObject, getObject, getPrefixedString, getPrefixedString, getString, getString, getUnsigned, getUnsigned, getUnsignedInt, getUnsignedInt, getUnsignedShort, getUnsignedShort, hashCode, hasRemaining, isPooled, isUseDirectBuffers, prefixedDataAvailable, prefixedDataAvailable, put, put, putObject, putPrefixedString, putPrefixedString, putPrefixedString, putPrefixedString, putString, putString, release, remaining, setAllocator, setPooled, setUseDirectBuffers, skip, slice, sweep, sweep, toString, wrap, wrap, wrappublic boolean isDirect()
isDirect 在类中 ByteBufferByteBuffer.isDirect()public boolean isReadOnly()
isReadOnly 在类中 ByteBufferBuffer.isReadOnly()public int capacity()
capacity 在类中 ByteBufferBuffer.capacity()public ByteBuffer capacity(int newCapacity)
ByteBuffercapacity 在类中 ByteBufferprotected abstract void capacity0(int newCapacity)
public boolean isAutoExpand()
ByteBufferisAutoExpand 在类中 ByteBufferpublic ByteBuffer setAutoExpand(boolean autoExpand)
ByteBuffersetAutoExpand 在类中 ByteBufferpublic ByteBuffer expand(int pos, int expectedRemaining)
ByteBufferexpand 在类中 ByteBufferpublic int position()
position 在类中 ByteBufferBuffer.position()public ByteBuffer position(int newPosition)
position 在类中 ByteBufferBuffer.position(int)public int limit()
limit 在类中 ByteBufferBuffer.limit()public ByteBuffer limit(int newLimit)
limit 在类中 ByteBufferBuffer.limit(int)public ByteBuffer mark()
mark 在类中 ByteBufferBuffer.mark()public int markValue()
ByteBuffermarkValue 在类中 ByteBufferpublic ByteBuffer reset()
reset 在类中 ByteBufferBuffer.reset()public ByteBuffer clear()
clear 在类中 ByteBufferBuffer.clear()public ByteBuffer flip()
flip 在类中 ByteBufferBuffer.flip()public ByteBuffer rewind()
rewind 在类中 ByteBufferBuffer.rewind()public byte get()
get 在类中 ByteBufferByteBuffer.get()public ByteBuffer put(byte b)
put 在类中 ByteBufferByteBuffer.put(byte)public byte get(int index)
get 在类中 ByteBufferByteBuffer.get(int)public ByteBuffer put(int index, byte b)
put 在类中 ByteBufferByteBuffer.put(int, byte)public ByteBuffer get(byte[] dst, int offset, int length)
get 在类中 ByteBufferByteBuffer.get(byte[], int, int)public ByteBuffer put(java.nio.ByteBuffer src)
ByteBufferput 在类中 ByteBufferpublic ByteBuffer put(byte[] src, int offset, int length)
put 在类中 ByteBufferByteBuffer.put(byte[], int, int)public ByteBuffer compact()
compact 在类中 ByteBufferByteBuffer.compact()public java.nio.ByteOrder order()
order 在类中 ByteBufferByteBuffer.order()public ByteBuffer order(java.nio.ByteOrder bo)
order 在类中 ByteBufferByteBuffer.order(ByteOrder)public char getChar()
getChar 在类中 ByteBufferByteBuffer.getChar()public ByteBuffer putChar(char value)
putChar 在类中 ByteBufferByteBuffer.putChar(char)public char getChar(int index)
getChar 在类中 ByteBufferByteBuffer.getChar(int)public ByteBuffer putChar(int index, char value)
putChar 在类中 ByteBufferByteBuffer.putChar(int, char)public java.nio.CharBuffer asCharBuffer()
asCharBuffer 在类中 ByteBufferByteBuffer.asCharBuffer()public short getShort()
getShort 在类中 ByteBufferByteBuffer.getShort()public ByteBuffer putShort(short value)
putShort 在类中 ByteBufferByteBuffer.putShort(short)public short getShort(int index)
getShort 在类中 ByteBufferByteBuffer.getShort()public ByteBuffer putShort(int index, short value)
putShort 在类中 ByteBufferByteBuffer.putShort(int, short)public java.nio.ShortBuffer asShortBuffer()
asShortBuffer 在类中 ByteBufferByteBuffer.asShortBuffer()public int getInt()
getInt 在类中 ByteBufferByteBuffer.getInt()public ByteBuffer putInt(int value)
putInt 在类中 ByteBufferByteBuffer.putInt(int)public int getInt(int index)
getInt 在类中 ByteBufferByteBuffer.getInt(int)public ByteBuffer putInt(int index, int value)
putInt 在类中 ByteBufferByteBuffer.putInt(int, int)public java.nio.IntBuffer asIntBuffer()
asIntBuffer 在类中 ByteBufferByteBuffer.asIntBuffer()public long getLong()
getLong 在类中 ByteBufferByteBuffer.getLong()public ByteBuffer putLong(long value)
putLong 在类中 ByteBufferByteBuffer.putLong(int, long)public long getLong(int index)
getLong 在类中 ByteBufferByteBuffer.getLong(int)public ByteBuffer putLong(int index, long value)
putLong 在类中 ByteBufferByteBuffer.putLong(int, long)public java.nio.LongBuffer asLongBuffer()
asLongBuffer 在类中 ByteBufferByteBuffer.asLongBuffer()public float getFloat()
getFloat 在类中 ByteBufferByteBuffer.getFloat()public ByteBuffer putFloat(float value)
putFloat 在类中 ByteBufferByteBuffer.putFloat(float)public float getFloat(int index)
getFloat 在类中 ByteBufferByteBuffer.getFloat(int)public ByteBuffer putFloat(int index, float value)
putFloat 在类中 ByteBufferByteBuffer.putFloat(int, float)public java.nio.FloatBuffer asFloatBuffer()
asFloatBuffer 在类中 ByteBufferByteBuffer.asFloatBuffer()public double getDouble()
getDouble 在类中 ByteBufferByteBuffer.getDouble()public ByteBuffer putDouble(double value)
putDouble 在类中 ByteBufferByteBuffer.putDouble(double)public double getDouble(int index)
getDouble 在类中 ByteBufferByteBuffer.getDouble(int)public ByteBuffer putDouble(int index, double value)
putDouble 在类中 ByteBufferByteBuffer.putDouble(int, double)public java.nio.DoubleBuffer asDoubleBuffer()
asDoubleBuffer 在类中 ByteBufferByteBuffer.asDoubleBuffer()