static byte[] toByteArray(RegionInfo ri) {
    byte[] bytes = ProtobufUtil.toRegionInfo(ri).toByteArray();
    return ProtobufUtil.prependPBMagic(bytes);
  }
Returns This instance serialized as protobuf w/ a magic pb prefix.
@see #parseFrom(byte[])
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java