@Override
  public byte[] toByteArray() {
    FilterProtos.ColumnPrefixFilter.Builder builder = FilterProtos.ColumnPrefixFilter.newBuilder();
    if (this.prefix != null) builder.setPrefix(UnsafeByteOperations.unsafeWrap(this.prefix));
    return builder.build().toByteArray();
  }
Returns The filter serialized using pb
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/ColumnPrefixFilter.java