@Override public final float getFloat(int index) { checkIndex(index, SizeOf.FLOAT); return Float.intBitsToFloat(this.block.peekInt(offset + index, order)); }
@Override public final int getInt(int index) { checkIndex(index, SizeOf.INT); return this.block.peekInt(offset + index, order); }
@Override public final byte get(int index) { checkIndex(index); return this.block.peekByte(offset + index); }
@Override public final char getChar(int index) { checkIndex(index, SizeOf.CHAR); return (char) this.block.peekShort(offset + index, order); }
@Override public final long getLong(int index) { checkIndex(index, SizeOf.LONG); return this.block.peekLong(offset + index, order); }
@Override public final short getShort(int index) { checkIndex(index, SizeOf.SHORT); return this.block.peekShort(offset + index, order); }
@Override public final double getDouble(int index) { checkIndex(index, SizeOf.DOUBLE); return Double.longBitsToDouble(this.block.peekLong(offset + index, order)); }
@Override public ByteBuffer putFloat(int index, float value) { if (isReadOnly) { throw new ReadOnlyBufferException(); } checkIndex(index, SizeOf.FLOAT); this.block.pokeInt(offset + index, Float.floatToRawIntBits(value), order); return this; }
@Override public ByteBuffer putDouble(int index, double value) { if (isReadOnly) { throw new ReadOnlyBufferException(); } checkIndex(index, SizeOf.DOUBLE); this.block.pokeLong(offset + index, Double.doubleToRawLongBits(value), order); return this; }
@Override public ByteBuffer putChar(int index, char value) { if (isReadOnly) { throw new ReadOnlyBufferException(); } checkIndex(index, SizeOf.CHAR); this.block.pokeShort(offset + index, (short) value, order); return this; }
@Override public ByteBuffer putLong(int index, long value) { if (isReadOnly) { throw new ReadOnlyBufferException(); } checkIndex(index, SizeOf.LONG); this.block.pokeLong(offset + index, value, order); return this; }
@Override public ByteBuffer put(int index, byte value) { if (isReadOnly) { throw new ReadOnlyBufferException(); } checkIndex(index); this.block.pokeByte(offset + index, value); return this; }
@Override public ByteBuffer putInt(int index, int value) { if (isReadOnly) { throw new ReadOnlyBufferException(); } checkIndex(index, SizeOf.INT); this.block.pokeInt(offset + index, value, order); return this; }
@Override public ByteBuffer putShort(int index, short value) { if (isReadOnly) { throw new ReadOnlyBufferException(); } checkIndex(index, SizeOf.SHORT); this.block.pokeShort(offset + index, value, order); return this; } }
@Override public ByteBuffer putFloat(int index, float value) { if (isReadOnly) { throw new ReadOnlyBufferException(); } checkIndex(index, SizeOf.FLOAT); this.block.pokeInt(offset + index, Float.floatToRawIntBits(value), order); return this; }
@Override public ByteBuffer put(int index, byte value) { if (isReadOnly) { throw new ReadOnlyBufferException(); } checkIndex(index); this.block.pokeByte(offset + index, value); return this; }
@Override public ByteBuffer putChar(int index, char value) { if (isReadOnly) { throw new ReadOnlyBufferException(); } checkIndex(index, SizeOf.CHAR); this.block.pokeShort(offset + index, (short) value, order); return this; }
@Override public ByteBuffer putShort(int index, short value) { if (isReadOnly) { throw new ReadOnlyBufferException(); } checkIndex(index, SizeOf.SHORT); this.block.pokeShort(offset + index, value, order); return this; } }
@Override public ByteBuffer put(int index, byte value) { if (isReadOnly) { throw new ReadOnlyBufferException(); } checkIndex(index); this.block.pokeByte(offset + index, value); return this; }
@Override public ByteBuffer putLong(int index, long value) { if (isReadOnly) { throw new ReadOnlyBufferException(); } checkIndex(index, SizeOf.LONG); this.block.pokeLong(offset + index, value, order); return this; }