Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.mina.common.ByteBuffer
org.apache.mina.common.support.BaseByteBuffer
public abstract class BaseByteBuffer
extends ByteBuffer
ByteBuffer
. This implementation
assumes that ByteBuffer.buf()
always returns a correct NIO
java.nio.ByteBuffer
instance. Most implementations could
extend this class and implement their own buffer management mechanism.
ByteBufferAllocator
Constructor Summary | |
Method Summary | |
CharBuffer | |
DoubleBuffer | |
FloatBuffer | |
IntBuffer | |
LongBuffer | |
ShortBuffer | |
int |
|
ByteBuffer |
|
protected abstract void |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
byte |
|
ByteBuffer |
|
byte |
|
char |
|
char |
|
double | |
double |
|
float |
|
float |
|
int |
|
int |
|
long |
|
long |
|
short |
|
short |
|
boolean |
|
boolean |
|
boolean | |
int |
|
ByteBuffer |
|
ByteBuffer |
|
int |
|
ByteOrder |
|
ByteBuffer |
|
int |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
ByteBuffer |
|
public CharBuffer asCharBuffer()
- Overrides:
- asCharBuffer in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.asCharBuffer()
public DoubleBuffer asDoubleBuffer()
- Overrides:
- asDoubleBuffer in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.asDoubleBuffer()
public FloatBuffer asFloatBuffer()
- Overrides:
- asFloatBuffer in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.asFloatBuffer()
public IntBuffer asIntBuffer()
- Overrides:
- asIntBuffer in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.asIntBuffer()
public LongBuffer asLongBuffer()
- Overrides:
- asLongBuffer in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.asLongBuffer()
public ShortBuffer asShortBuffer()
- Overrides:
- asShortBuffer in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.asShortBuffer()
public int capacity()
- Overrides:
- capacity in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.capacity()
public ByteBuffer capacity(int newCapacity)
Changes the capacity of this buffer.
- Overrides:
- capacity in interface ByteBuffer
protected abstract void capacity0(int newCapacity)
Implement this method to increase the capacity of this buffer. newCapacity is always greater than the current capacity.
public ByteBuffer clear()
- Overrides:
- clear in interface ByteBuffer
- See Also:
java.nio.Buffer.clear()
public ByteBuffer compact()
- Overrides:
- compact in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.compact()
public 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. This method works even if you didn't set autoExpand to true.
- Overrides:
- expand in interface ByteBuffer
public ByteBuffer get(byte[] dst, int offset, int length)
- Overrides:
- get in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.get(byte[], int, int)
public byte get(int index)
- Overrides:
- get in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.get(int)
public char getChar()
- Overrides:
- getChar in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.getChar()
public char getChar(int index)
- Overrides:
- getChar in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.getChar(int)
public double getDouble()
- Overrides:
- getDouble in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.getDouble()
public double getDouble(int index)
- Overrides:
- getDouble in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.getDouble(int)
public float getFloat()
- Overrides:
- getFloat in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.getFloat()
public float getFloat(int index)
- Overrides:
- getFloat in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.getFloat(int)
public int getInt()
- Overrides:
- getInt in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.getInt()
public int getInt(int index)
- Overrides:
- getInt in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.getInt(int)
public long getLong()
- Overrides:
- getLong in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.getLong()
public long getLong(int index)
- Overrides:
- getLong in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.getLong(int)
public short getShort()
- Overrides:
- getShort in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.getShort()
public short getShort(int index)
- Overrides:
- getShort in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.getShort()
public boolean isAutoExpand()
Returns true if and only if autoExpand is turned on.
- Overrides:
- isAutoExpand in interface ByteBuffer
public boolean isDirect()
- Overrides:
- isDirect in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.isDirect()
public boolean isReadOnly()
- Overrides:
- isReadOnly in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.isReadOnly()
public ByteBuffer limit(int newLimit)
- Overrides:
- limit in interface ByteBuffer
- See Also:
java.nio.Buffer.limit(int)
public int markValue()
Returns the position of the current mark. This method returns -1 if no mark is set.
- Overrides:
- markValue in interface ByteBuffer
public ByteOrder order()
- Overrides:
- order in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.order()
public ByteBuffer order(ByteOrder bo)
- Overrides:
- order in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.order(ByteOrder)
public int position()
- Overrides:
- position in interface ByteBuffer
- See Also:
java.nio.Buffer.position()
public ByteBuffer position(int newPosition)
- Overrides:
- position in interface ByteBuffer
- See Also:
java.nio.Buffer.position(int)
public ByteBuffer put(byte b)
- Overrides:
- put in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.put(byte)
public ByteBuffer put(byte[] src, int offset, int length)
- Overrides:
- put in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.put(byte[], int, int)
public ByteBuffer put(int index, byte b)
- Overrides:
- put in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.put(int, byte)
public ByteBuffer put(java.nio.ByteBuffer src)
Writes the content of the specified src into this buffer.
- Overrides:
- put in interface ByteBuffer
public ByteBuffer putChar(char value)
- Overrides:
- putChar in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.putChar(char)
public ByteBuffer putChar(int index, char value)
- Overrides:
- putChar in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.putChar(int, char)
public ByteBuffer putDouble(double value)
- Overrides:
- putDouble in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.putDouble(double)
public ByteBuffer putDouble(int index, double value)
- Overrides:
- putDouble in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.putDouble(int, double)
public ByteBuffer putFloat(float value)
- Overrides:
- putFloat in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.putFloat(float)
public ByteBuffer putFloat(int index, float value)
- Overrides:
- putFloat in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.putFloat(int, float)
public ByteBuffer putInt(int value)
- Overrides:
- putInt in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.putInt(int)
public ByteBuffer putInt(int index, int value)
- Overrides:
- putInt in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.putInt(int, int)
public ByteBuffer putLong(int index, long value)
- Overrides:
- putLong in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.putLong(int, long)
public ByteBuffer putLong(long value)
- Overrides:
- putLong in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.putLong(int, long)
public ByteBuffer putShort(int index, short value)
- Overrides:
- putShort in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.putShort(int, short)
public ByteBuffer putShort(short value)
- Overrides:
- putShort in interface ByteBuffer
- See Also:
java.nio.ByteBuffer.putShort(short)
public ByteBuffer reset()
- Overrides:
- reset in interface ByteBuffer
- See Also:
java.nio.Buffer.reset()
public ByteBuffer rewind()
- Overrides:
- rewind in interface ByteBuffer
- See Also:
java.nio.Buffer.rewind()
public ByteBuffer setAutoExpand(boolean autoExpand)
Turns on or off autoExpand.
- Overrides:
- setAutoExpand in interface ByteBuffer