| |
|
| java.lang.Object java.nio.Buffer java.nio.ByteBuffer java.nio.BaseByteBuffer java.nio.DirectByteBuffer
All known Subclasses: java.nio.ReadWriteDirectByteBuffer, java.nio.ReadOnlyDirectByteBuffer,
DirectByteBuffer | abstract class DirectByteBuffer extends BaseByteBuffer implements DirectBuffer(Code) | | DirectByteBuffer, ReadWriteDirectByteBuffer and ReadOnlyDirectByteBuffer
compose the implementation of platform memory based byte buffers.
DirectByteBuffer implements all the shared readonly methods and is extended
by the other two classes.
All methods are marked final for runtime performance.
|
Inner Class :final static class SafeAddress | |
offset | final protected int offset(Code) | | |
safeAddress | final protected SafeAddress safeAddress(Code) | | |
DirectByteBuffer | DirectByteBuffer(int capacity)(Code) | | |
DirectByteBuffer | DirectByteBuffer(SafeAddress address, int capacity, int offset)(Code) | | |
addressValidityCheck | final public void addressValidityCheck()(Code) | | |
free | final public void free()(Code) | | Explicitly free the memory used by this direct byte buffer. If the memory
has already been freed then this is a no-op. Once the memory has been
freed then operations requiring access to the memory will throw an
IllegalStateException .
Note this is is possible that the memory is freed by code that reaches
into the address and explicitly frees it 'beneith' us -- this is bad
form.
|
get | final public byte get()(Code) | | |
get | final public byte get(int index)(Code) | | |
getBaseAddress | final public PlatformAddress getBaseAddress()(Code) | | |
getByteCapacity | final public int getByteCapacity()(Code) | | |
getDouble | final public double getDouble()(Code) | | |
getDouble | final public double getDouble(int index)(Code) | | |
getEffectiveAddress | final public PlatformAddress getEffectiveAddress()(Code) | | Answers the platform address of the start of this buffer instance.
You must not attempt to free the returned address!! It may not
be an address that was explicitly malloc'ed (i.e. if this buffer is the
result of a split); and it may be memory shared by multiple buffers.
If you can guarantee that you want to free the underlying memory call the
#free() method on this instance -- generally applications will rely on
the garbage collector to autofree this memory.
the effective address of the start of the buffer. throws: IllegalStateException - if this buffer address is known to have been freedpreviously. |
getFloat | final public float getFloat()(Code) | | |
getFloat | final public float getFloat(int index)(Code) | | |
getInt | final public int getInt()(Code) | | |
getInt | final public int getInt(int index)(Code) | | |
getLong | final public long getLong()(Code) | | |
getLong | final public long getLong(int index)(Code) | | |
getShort | final public short getShort()(Code) | | |
getShort | final public short getShort(int index)(Code) | | |
isAddressValid | final public boolean isAddressValid()(Code) | | |
isDirect | final public boolean isDirect()(Code) | | |
protectedArray | final protected byte[] protectedArray()(Code) | | |
protectedArrayOffset | final protected int protectedArrayOffset()(Code) | | |
protectedHasArray | final protected boolean protectedHasArray()(Code) | | |
Methods inherited from java.nio.ByteBuffer | public static ByteBuffer allocate(int capacity)(Code)(Java Doc) public static ByteBuffer allocateDirect(int capacity)(Code)(Java Doc) final public byte[] array()(Code)(Java Doc) final public int arrayOffset()(Code)(Java Doc) abstract public CharBuffer asCharBuffer()(Code)(Java Doc) abstract public DoubleBuffer asDoubleBuffer()(Code)(Java Doc) abstract public FloatBuffer asFloatBuffer()(Code)(Java Doc) abstract public IntBuffer asIntBuffer()(Code)(Java Doc) abstract public LongBuffer asLongBuffer()(Code)(Java Doc) abstract public ByteBuffer asReadOnlyBuffer()(Code)(Java Doc) abstract public ShortBuffer asShortBuffer()(Code)(Java Doc) abstract public ByteBuffer compact()(Code)(Java Doc) public int compareTo(ByteBuffer otherBuffer)(Code)(Java Doc) abstract public ByteBuffer duplicate()(Code)(Java Doc) public boolean equals(Object other)(Code)(Java Doc) abstract public byte get()(Code)(Java Doc) public ByteBuffer get(byte[] dest)(Code)(Java Doc) public ByteBuffer get(byte[] dest, int off, int len)(Code)(Java Doc) abstract public byte get(int index)(Code)(Java Doc) abstract public char getChar()(Code)(Java Doc) abstract public char getChar(int index)(Code)(Java Doc) abstract public double getDouble()(Code)(Java Doc) abstract public double getDouble(int index)(Code)(Java Doc) abstract public float getFloat()(Code)(Java Doc) abstract public float getFloat(int index)(Code)(Java Doc) abstract public int getInt()(Code)(Java Doc) abstract public int getInt(int index)(Code)(Java Doc) abstract public long getLong()(Code)(Java Doc) abstract public long getLong(int index)(Code)(Java Doc) abstract public short getShort()(Code)(Java Doc) abstract public short getShort(int index)(Code)(Java Doc) final public boolean hasArray()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) abstract public boolean isDirect()(Code)(Java Doc) final public ByteOrder order()(Code)(Java Doc) final public ByteBuffer order(ByteOrder byteOrder)(Code)(Java Doc) ByteBuffer orderImpl(ByteOrder byteOrder)(Code)(Java Doc) abstract byte[] protectedArray()(Code)(Java Doc) abstract int protectedArrayOffset()(Code)(Java Doc) abstract boolean protectedHasArray()(Code)(Java Doc) abstract public ByteBuffer put(byte b)(Code)(Java Doc) final public ByteBuffer put(byte[] src)(Code)(Java Doc) public ByteBuffer put(byte[] src, int off, int len)(Code)(Java Doc) public ByteBuffer put(ByteBuffer src)(Code)(Java Doc) abstract public ByteBuffer put(int index, byte b)(Code)(Java Doc) abstract public ByteBuffer putChar(char value)(Code)(Java Doc) abstract public ByteBuffer putChar(int index, char value)(Code)(Java Doc) abstract public ByteBuffer putDouble(double value)(Code)(Java Doc) abstract public ByteBuffer putDouble(int index, double value)(Code)(Java Doc) abstract public ByteBuffer putFloat(float value)(Code)(Java Doc) abstract public ByteBuffer putFloat(int index, float value)(Code)(Java Doc) abstract public ByteBuffer putInt(int value)(Code)(Java Doc) abstract public ByteBuffer putInt(int index, int value)(Code)(Java Doc) abstract public ByteBuffer putLong(long value)(Code)(Java Doc) abstract public ByteBuffer putLong(int index, long value)(Code)(Java Doc) abstract public ByteBuffer putShort(short value)(Code)(Java Doc) abstract public ByteBuffer putShort(int index, short value)(Code)(Java Doc) abstract public ByteBuffer slice()(Code)(Java Doc) public String toString()(Code)(Java Doc) public static ByteBuffer wrap(byte[] array)(Code)(Java Doc) public static ByteBuffer wrap(byte[] array, int start, int len)(Code)(Java Doc)
|
|
|
|