public static void serializeUserMetadataRecord(ByteBuffer outputBuffer, ByteBuffer userMetadata) {
      int startOffset = outputBuffer.position();
      outputBuffer.putShort(UserMetadata_Version_V1);
      outputBuffer.putInt(userMetadata.limit());
      outputBuffer.put(userMetadata);
      CRC32 crc = new CRC32();
      crc.update(outputBuffer.array(), startOffset, getUserMetadataSize(userMetadata) - Crc_Size);
      outputBuffer.putLong(crc.getValue());
    }
- - - - - - - - - - - - - - - - - - - - - - - -
|         |           |            |            |
| version |   size    |  content   |     Crc    |
|(2 bytes)| (4 bytes) |  (n bytes) |  (8 bytes) |
|         |           |            |            |
 - - - - - - - - - - - - - - - - - - - - - - - -
 version    - The version of the user metadata record

 size       - The size of the user metadata content

 content    - The actual content that represents the user metadata

 crc        - The crc of the user metadata record
ambry-messageformat/src/main/java/com/github/ambry/messageformat/MessageFormatRecord.java