code: public int compareTo(BinaryComparable other) {
          if (this == other)
              return 0;
          return WritableComparator.compareBytes(getBytes(), 0, getLength(), other.getBytes(), 0, other.getLength());
      }
docs: Compare bytes from {#getBytes()}.
  @see org.apache.hadoop.io.WritableComparator#compareBytes(byte[],int,int,byte[],int,int)