@Override
  public byte[] toByteArray() {
    ComparatorProtos.BinaryComparator.Builder builder =
      ComparatorProtos.BinaryComparator.newBuilder();
    builder.setComparable(ProtobufUtil.toByteArrayComparable(this.value));
    return builder.build().toByteArray();
  }
Returns The comparator serialized using pb
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/BinaryComparator.java