docs: public static byte[] marshallTxnEntry(TxnHeader hdr, Record txn)
              throws IOException {
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          OutputArchive boa = BinaryOutputArchive.getArchive(baos);
  
          hdr.serialize(boa, "hdr");
          if (txn != null) {
              txn.serialize(boa, "txn");
          }
          return baos.toByteArray();
      }