public static TablePermission toTablePermission(AccessControlProtos.TablePermission proto) {
    Permission.Action[] actions = toPermissionActions(proto.getActionList());
    if (!proto.hasTableName()) {
      throw new IllegalStateException("TableName cannot be empty");
    }
    TableName table = ProtobufUtil.toTableName(proto.getTableName());
    byte[] family = null;
    byte[] qualifier = null;
    if (proto.hasFamily()) {
      family = proto.getFamily().toByteArray();
    }
    if (proto.hasQualifier()) {
      qualifier = proto.getQualifier().toByteArray();
    }
    return new TablePermission(table, family, qualifier, actions);
  }
Converts a TablePermission proto to a client TablePermission object.
@param proto the protobuf TablePermission
@return the converted TablePermission
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlUtil.java