code: public void writeParameterSet(ParameterSet params) throws IOException {
          int len = params.getSerializedSize();
          growIfNeeded(len);
          params.flattenToBuffer(buffer.b());
      }
docs: Write a ParameterSet using it's ByteBuffer serialization code.