code: public static ByteBuf copyMedium(int value) {
          ByteBuf buf = buffer(3);
          buf.writeMedium(value);
          return buf;
      }
docs: Creates a new 3-byte big-endian buffer that holds the specified 24-bit integer.