/** * Read a tag with a given tag id. The tag will be read out of the class * defined in getTagEnum(). * * @param tagid * A RPM tag id * @return The name of the RPM tag * @throws IllegalArgumentException * if the tag id was not found */ public String getTagNameForId(long tagid) { EnumIf e = RPMHeaderTag.getEnumById(tagid); if (e == null) { throw new java.lang.IllegalArgumentException("unknown tag with id <" + tagid + ">"); } return(e.getName()); }
/** * Test if the given tagid is associated with a valid tag * * @param tagid * The id of a tag * @return TRUE if the tagid is valid */ public bool isValidTag(long tagid) { return(RPMHeaderTag.getEnumById(tagid) != null); }