code: protected <M> M getNextBinaryValue(TypeRef<M> typeRef) throws IOException {
      //typeRef is just to help compiler resolve the type at compile time.
      try {
        if (reader != null && reader.nextKeyValue()) {
          @SuppressWarnings("unchecked")
          BinaryWritable<M> writable = (BinaryWritable<M>)reader.getCurrentValue();
          return writable.get();
        }
      } catch (InterruptedException e) {
        LOG.error("InterruptedException encountered, bailing.", e);
        throw new IOException(e);
      }
  
      return null;
    }
docs: A utility method for loaders that read {@link BinaryWritable} values.