public void setByte(int index, byte b) { chk(index, 1); PlatformDependent.putByte(addr(index), b); }
@Override public byte getByte(int index) { chk(index, 1); return PlatformDependent.getByte(addr(index)); }
@Override public ByteBuf setDouble(int index, double value) { chk(index, 8); PlatformDependent.putLong(addr(index), Double.doubleToRawLongBits(value)); return this; }
@Override public ByteBuf setByte(int index, int value) { chk(index, 1); PlatformDependent.putByte(addr(index), (byte) value); return this; }
@Override public ByteBuf setChar(int index, int value) { chk(index, 2); PlatformDependent.putShort(addr(index), (short) value); return this; }
@Override public ByteBuf setFloat(int index, float value) { chk(index, 4); PlatformDependent.putInt(addr(index), Float.floatToRawIntBits(value)); return this; }
@Override public ByteBuf setLong(int index, long value) { chk(index, 8); PlatformDependent.putLong(addr(index), value); return this; }
@Override public ByteBuf setInt(int index, int value) { chk(index, 4); PlatformDependent.putInt(addr(index), value); return this; }
@Override public short getShort(int index) { chk(index, 2); short v = PlatformDependent.getShort(addr(index)); return v; }
@Override public int getInt(int index) { chk(index, 4); int v = PlatformDependent.getInt(addr(index)); return v; }
@Override public long getLong(int index) { chk(index, 8); long v = PlatformDependent.getLong(addr(index)); return v; }