code: private static Record createRecord(String data) {
          return new Record().withData(ByteBuffer.wrap(data.getBytes()));
      }
docs: Method to create the record object for given data.
  
  @param data the content data
  @return the Record object