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