|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.littleshoot.mina.common.ByteBuffer
org.littleshoot.mina.common.support.BaseByteBuffer
public abstract class BaseByteBuffer
A base implementation of 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| Constructor Summary | |
|---|---|
protected |
BaseByteBuffer()
|
| Method Summary | |
|---|---|
CharBuffer |
asCharBuffer()
|
DoubleBuffer |
asDoubleBuffer()
|
FloatBuffer |
asFloatBuffer()
|
IntBuffer |
asIntBuffer()
|
LongBuffer |
asLongBuffer()
|
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. |
ByteOrder |
order()
|
ByteBuffer |
order(ByteOrder bo)
|
int |
position()
|
ByteBuffer |
position(int newPosition)
|
ByteBuffer |
put(byte b)
|
ByteBuffer |
put(byte[] src,
int offset,
int length)
|
ByteBuffer |
put(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. |
| Methods inherited from class org.littleshoot.mina.common.ByteBuffer |
|---|
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, wrap |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected BaseByteBuffer()
| Method Detail |
|---|
public boolean isDirect()
isDirect in class ByteBufferByteBuffer.isDirect()public boolean isReadOnly()
isReadOnly in class ByteBufferBuffer.isReadOnly()public int capacity()
capacity in class ByteBufferBuffer.capacity()public ByteBuffer capacity(int newCapacity)
ByteBuffer
capacity in class ByteBufferprotected abstract void capacity0(int newCapacity)
public boolean isAutoExpand()
ByteBuffer
isAutoExpand in class ByteBufferpublic ByteBuffer setAutoExpand(boolean autoExpand)
ByteBuffer
setAutoExpand in class ByteBuffer
public ByteBuffer expand(int pos,
int expectedRemaining)
ByteBuffer
expand in class ByteBufferpublic int position()
position in class ByteBufferBuffer.position()public ByteBuffer position(int newPosition)
position in class ByteBufferBuffer.position(int)public int limit()
limit in class ByteBufferBuffer.limit()public ByteBuffer limit(int newLimit)
limit in class ByteBufferBuffer.limit(int)public ByteBuffer mark()
mark in class ByteBufferBuffer.mark()public int markValue()
ByteBuffer
markValue in class ByteBufferpublic ByteBuffer reset()
reset in class ByteBufferBuffer.reset()public ByteBuffer clear()
clear in class ByteBufferBuffer.clear()public ByteBuffer flip()
flip in class ByteBufferBuffer.flip()public ByteBuffer rewind()
rewind in class ByteBufferBuffer.rewind()public byte get()
get in class ByteBufferByteBuffer.get()public ByteBuffer put(byte b)
put in class ByteBufferByteBuffer.put(byte)public byte get(int index)
get in class ByteBufferByteBuffer.get(int)
public ByteBuffer put(int index,
byte b)
put in class ByteBufferByteBuffer.put(int, byte)
public ByteBuffer get(byte[] dst,
int offset,
int length)
get in class ByteBufferByteBuffer.get(byte[], int, int)public ByteBuffer put(ByteBuffer src)
ByteBuffer
put in class ByteBuffer
public ByteBuffer put(byte[] src,
int offset,
int length)
put in class ByteBufferByteBuffer.put(byte[], int, int)public ByteBuffer compact()
compact in class ByteBufferByteBuffer.compact()public ByteOrder order()
order in class ByteBufferByteBuffer.order()public ByteBuffer order(ByteOrder bo)
order in class ByteBufferByteBuffer.order(ByteOrder)public char getChar()
getChar in class ByteBufferByteBuffer.getChar()public ByteBuffer putChar(char value)
putChar in class ByteBufferByteBuffer.putChar(char)public char getChar(int index)
getChar in class ByteBufferByteBuffer.getChar(int)
public ByteBuffer putChar(int index,
char value)
putChar in class ByteBufferByteBuffer.putChar(int, char)public CharBuffer asCharBuffer()
asCharBuffer in class ByteBufferByteBuffer.asCharBuffer()public short getShort()
getShort in class ByteBufferByteBuffer.getShort()public ByteBuffer putShort(short value)
putShort in class ByteBufferByteBuffer.putShort(short)public short getShort(int index)
getShort in class ByteBufferByteBuffer.getShort()
public ByteBuffer putShort(int index,
short value)
putShort in class ByteBufferByteBuffer.putShort(int, short)public ShortBuffer asShortBuffer()
asShortBuffer in class ByteBufferByteBuffer.asShortBuffer()public int getInt()
getInt in class ByteBufferByteBuffer.getInt()public ByteBuffer putInt(int value)
putInt in class ByteBufferByteBuffer.putInt(int)public int getInt(int index)
getInt in class ByteBufferByteBuffer.getInt(int)
public ByteBuffer putInt(int index,
int value)
putInt in class ByteBufferByteBuffer.putInt(int, int)public IntBuffer asIntBuffer()
asIntBuffer in class ByteBufferByteBuffer.asIntBuffer()public long getLong()
getLong in class ByteBufferByteBuffer.getLong()public ByteBuffer putLong(long value)
putLong in class ByteBufferByteBuffer.putLong(int, long)public long getLong(int index)
getLong in class ByteBufferByteBuffer.getLong(int)
public ByteBuffer putLong(int index,
long value)
putLong in class ByteBufferByteBuffer.putLong(int, long)public LongBuffer asLongBuffer()
asLongBuffer in class ByteBufferByteBuffer.asLongBuffer()public float getFloat()
getFloat in class ByteBufferByteBuffer.getFloat()public ByteBuffer putFloat(float value)
putFloat in class ByteBufferByteBuffer.putFloat(float)public float getFloat(int index)
getFloat in class ByteBufferByteBuffer.getFloat(int)
public ByteBuffer putFloat(int index,
float value)
putFloat in class ByteBufferByteBuffer.putFloat(int, float)public FloatBuffer asFloatBuffer()
asFloatBuffer in class ByteBufferByteBuffer.asFloatBuffer()public double getDouble()
getDouble in class ByteBufferByteBuffer.getDouble()public ByteBuffer putDouble(double value)
putDouble in class ByteBufferByteBuffer.putDouble(double)public double getDouble(int index)
getDouble in class ByteBufferByteBuffer.getDouble(int)
public ByteBuffer putDouble(int index,
double value)
putDouble in class ByteBufferByteBuffer.putDouble(int, double)public DoubleBuffer asDoubleBuffer()
asDoubleBuffer in class ByteBufferByteBuffer.asDoubleBuffer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||