code: public static ByteBuf copyFloat(float value) {
          ByteBuf buf = buffer(4);
          buf.writeFloat(value);
          return buf;
      }
docs: Creates a new 4-byte big-endian buffer that holds the specified 32-bit floating point number.