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