code: @Override
    @SuppressWarnings("unchecked")
    public D readRecord(@Deprecated D reuse) throws DataRecordException, IOException {
      try {
        if (this.recordReader.nextKeyValue()) {
          return this.readKeys ? (D) this.recordReader.getCurrentKey() : (D) this.recordReader.getCurrentValue();
        }
      } catch (InterruptedException ie) {
        throw new IOException(ie);
      }
  
      return null;
    }
docs: {@inheritDoc}.
  
  This method will throw a {@link ClassCastException} if type {@link #<D>} is not compatible
  with type {@link #<K>} if keys are supposed to be read, or if it is not compatible with type
  {@link #<V>} if values are supposed to be read.