@InterfaceAudience.Private
  static RegionInfo parseFrom(final byte[] bytes, int offset, int len)
    throws DeserializationException {
    if (ProtobufUtil.isPBMagicPrefix(bytes, offset, len)) {
      int pblen = ProtobufUtil.lengthOfPBMagic();
      try {
        HBaseProtos.RegionInfo.Builder builder = HBaseProtos.RegionInfo.newBuilder();
        ProtobufUtil.mergeFrom(builder, bytes, pblen + offset, len - pblen);
        HBaseProtos.RegionInfo ri = builder.build();
        return ProtobufUtil.toRegionInfo(ri);
      } catch (IOException e) {
        throw new DeserializationException(e);
      }
    } else {
      throw new DeserializationException("PB encoded RegionInfo expected");
    }
  }
Parse a serialized representation of {@link RegionInfo}
@param bytes  A pb RegionInfo serialized with a pb magic prefix.
@param offset starting point in the byte array
@param len    length to read on the byte array
@return A deserialized {@link RegionInfo}
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java