Пример #1
0
 @Override
 public ByteBuf writeDouble(double value) {
   ensure(8);
   PlatformDependent.putLong(addr(writerIndex), Double.doubleToRawLongBits(value));
   writerIndex += 8;
   return this;
 }
Пример #2
0
 @Override
 public ByteBuf writeFloat(float value) {
   ensure(4);
   PlatformDependent.putInt(addr(writerIndex), Float.floatToRawIntBits(value));
   writerIndex += 4;
   return this;
 }
Пример #3
0
 @Override
 public ByteBuf writeLong(long value) {
   ensure(8);
   PlatformDependent.putLong(addr(writerIndex), value);
   writerIndex += 8;
   return this;
 }
Пример #4
0
 @Override
 public ByteBuf writeChar(int value) {
   ensure(2);
   PlatformDependent.putShort(addr(writerIndex), (short) value);
   writerIndex += 2;
   return this;
 }
Пример #5
0
 @Override
 public ByteBuf writeInt(int value) {
   ensure(4);
   PlatformDependent.putInt(addr(writerIndex), value);
   writerIndex += 4;
   return this;
 }