private static DeleteSubRecord getDeleteSubRecord(DataInputStream inputStream)
        throws IOException, MessageFormatException {
      short version = inputStream.readShort();
      switch (version) {
        case Delete_Subrecord_Version_V1:
          return Delete_Sub_Format_V1.deserialize(inputStream);
        default:
          throw new MessageFormatException("delete record version not supported: " + version,
              MessageFormatErrorCodes.UnknownFormatVersion);
      }
    }
@param inputStream the stream that contains the serialized form of a {@link DeleteSubRecord}.
@return the deserialized {@link DeleteSubRecord}
@throws IOException if there are problems reading from stream.
@throws MessageFormatException if the format of the message is unexpected.
ambry-messageformat/src/main/java/com/github/ambry/messageformat/MessageFormatRecord.java