public static Byte extractVisibilityTags(ExtendedCell cell, List<Tag> tags) {
    Byte serializationFormat = null;
    Iterator<Tag> tagsIterator = PrivateCellUtil.tagsIterator(cell);
    while (tagsIterator.hasNext()) {
      Tag tag = tagsIterator.next();
      if (tag.getType() == TagType.VISIBILITY_EXP_SERIALIZATION_FORMAT_TAG_TYPE) {
        serializationFormat = Tag.getValueAsByte(tag);
      } else if (tag.getType() == VISIBILITY_TAG_TYPE) {
        tags.add(tag);
      }
    }
    return serializationFormat;
  }
Extract the visibility tags of the given Cell into the given List
@param cell - the cell
@param tags - the array that will be populated if visibility tags are present
@return The visibility tags serialization format
hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityUtils.java