@Override
  public byte[] toByteArray() {
    ComparatorProtos.BinaryComponentComparator.Builder builder =
      ComparatorProtos.BinaryComponentComparator.newBuilder();
    builder.setValue(ByteString.copyFrom(this.value));
    builder.setOffset(this.offset);
    return builder.build().toByteArray();
  }
Returns The comparator serialized using pb
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BinaryComponentComparator.java