• Method Summary

    alignedSlice(int unitSize)

    Creates a new byte buffer whose content is a shared and aligned subsequence of this buffer's content.

    final int

    alignmentOffset(int index, int unitSize)

    Returns the memory address, pointing to the byte at the given index, modulo the given unit size.

    allocate(int capacity)

    Allocates a new byte buffer.

    allocateDirect(int capacity)

    Allocates a new direct byte buffer.

    final byte[]

    array()

    Returns the byte array that backs this buffer  (optional operation).

    final int

    Returns the offset within this buffer's backing array of the first element of the buffer  (optional operation).

    Creates a view of this byte buffer as a char buffer.

    Creates a view of this byte buffer as a double buffer.

    Creates a view of this byte buffer as a float buffer.

    Creates a view of this byte buffer as an int buffer.

    Creates a view of this byte buffer as a long buffer.

    Creates a new, read-only byte buffer that shares this buffer's content.

    Creates a view of this byte buffer as a short buffer.

    clear()

    compact()

    Compacts this buffer  (optional operation).

    int

    Compares this buffer to another.

    duplicate()

    Creates a new byte buffer that shares this buffer's content.

    boolean

    Tells whether or not this buffer is equal to another object.

    flip()

    abstract byte

    get()

    get(byte[] dst)

    Relative bulk get method.

    get(byte[] dst, int offset, int length)

    Relative bulk get method.

    abstract byte

    get(int index)

    get(int index, byte[] dst)

    Absolute bulk get method.

    get(int index, byte[] dst, int offset, int length)

    Absolute bulk get method.

    abstract char

    getChar()

    Relative get method for reading a char value.

    abstract char

    getChar(int index)

    Absolute get method for reading a char value.

    abstract double

    getDouble()

    Relative get method for reading a double value.

    abstract double

    getDouble(int index)

    Absolute get method for reading a double value.

    abstract float

    getFloat()

    Relative get method for reading a float value.

    abstract float

    getFloat(int index)

    Absolute get method for reading a float value.

    abstract int

    getInt()

    Relative get method for reading an int value.

    abstract int

    getInt(int index)

    Absolute get method for reading an int value.

    abstract long

    getLong()

    Relative get method for reading a long value.

    abstract long

    getLong(int index)

    Absolute get method for reading a long value.

    abstract short

    getShort()

    Relative get method for reading a short value.

    abstract short

    getShort(int index)

    Absolute get method for reading a short value.

    final boolean

    hasArray()

    Tells whether or not this buffer is backed by an accessible byte array.

    int

    hashCode()

    Returns the current hash code of this buffer.

    abstract boolean

    isDirect()

    Tells whether or not this byte buffer is direct.

    limit(int newLimit)

    Sets this buffer's limit.

    mark()

    Sets this buffer's mark at its position.

    int

    Finds and returns the relative index of the first mismatch between this buffer and a given buffer.

    order()

    Retrieves this buffer's byte order.

    Modifies this buffer's byte order.

    position(int newPosition)

    Sets this buffer's position.

    put(byte b)

    Relative put method  (optional operation).

    put(byte[] src)

    Relative bulk put method  (optional operation).

    put(byte[] src, int offset, int length)

    Relative bulk put method  (optional operation).

    put(int index, byte b)

    Absolute put method  (optional operation).

    put(int index, byte[] src)

    Absolute bulk put method  (optional operation).

    put(int index, byte[] src, int offset, int length)

    Absolute bulk put method  (optional operation).

    put(int index, ByteBuffer src, int offset, int length)

    Absolute bulk put method  (optional operation).

    Relative bulk put method  (optional operation).

    putChar(char value)

    Relative put method for writing a char value  (optional operation).

    putChar(int index, char value)

    Absolute put method for writing a char value  (optional operation).

    putDouble(double value)

    Relative put method for writing a double value  (optional operation).

    putDouble(int index, double value)

    Absolute put method for writing a double value  (optional operation).

    putFloat(float value)

    Relative put method for writing a float value  (optional operation).

    putFloat(int index, float value)

    Absolute put method for writing a float value  (optional operation).

    putInt(int value)

    Relative put method for writing an int value  (optional operation).

    putInt(int index, int value)

    Absolute put method for writing an int value  (optional operation).

    putLong(int index, long value)

    Absolute put method for writing a long value  (optional operation).

    putLong(long value)

    Relative put method for writing a long value  (optional operation).

    putShort(int index, short value)

    Absolute put method for writing a short value  (optional operation).

    putShort(short value)

    Relative put method for writing a short value  (optional operation).

    reset()

    Resets this buffer's position to the previously-marked position.

    rewind()

    slice()

    Creates a new byte buffer whose content is a shared subsequence of this buffer's content.

    slice(int index, int length)

    Creates a new byte buffer whose content is a shared subsequence of this buffer's content.

    toString()

    Returns a string summarizing the state of this buffer.

    wrap(byte[] array)

    Wraps a byte array into a buffer.

    wrap(byte[] array, int offset, int length)

    Wraps a byte array into a buffer.

  • Method Details

    • allocateDirect

    • allocate

    • wrap

    • wrap

    • slice

    • slice

    • duplicate

    • asReadOnlyBuffer

    • get

    • put

    • get

    • put

    • get

    • get

    • get

    • get

    • put

    • put

    • put

    • put

    • put

    • put

    • hasArray

    • array

    • arrayOffset

    • position

    • limit

    • mark

    • reset

    • clear

    • flip

    • rewind

    • compact

    • isDirect

    • toString

    • hashCode

    • equals

    • compareTo

    • mismatch

    • order

    • order

    • alignmentOffset

    • alignedSlice

    • getChar

    • putChar

    • getChar

    • putChar

    • asCharBuffer

    • getShort

    • putShort

    • getShort

    • putShort

    • asShortBuffer

    • getInt

    • putInt

    • getInt

    • putInt

    • asIntBuffer

    • getLong

    • putLong

    • getLong

    • putLong

    • asLongBuffer

    • getFloat

    • putFloat

    • getFloat

    • putFloat

    • asFloatBuffer

    • getDouble

    • putDouble

    • getDouble

    • putDouble

    • asDoubleBuffer