示例#1
0
 /**
  * Create a new big-endian buffer that holds a sequence of the specified 32-bit floating point
  * numbers.
  */
 public static ByteBuf copyFloat(float... values) {
   if (values == null || values.length == 0) {
     return EMPTY_BUFFER;
   }
   ByteBuf buffer = buffer(values.length * 4);
   for (float v : values) {
     buffer.writeFloat(v);
   }
   return buffer;
 }
示例#2
0
 @Override
 public ByteBuf writeFloat(float value) {
   buf.writeFloat(value);
   return this;
 }
示例#3
0
 /**
  * Creates a new 4-byte big-endian buffer that holds the specified 32-bit floating point number.
  */
 public static ByteBuf copyFloat(float value) {
   ByteBuf buf = buffer(4);
   buf.writeFloat(value);
   return buf;
 }