pig/src/main/java/com/twitter/elephantbird/pig/load/LzoBaseLoadFunc.java
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;
  }
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;
  }
A utility method for loaders that read {@link BinaryWritable} values.