Enum Class Utils

java.lang.Object
java.lang.Enum<Utils>
edu.harvard.hul.ois.jhove.Utils
All Implemented Interfaces:
Serializable, Comparable<Utils>, java.lang.constant.Constable

public enum Utils extends Enum<Utils>
  • Enum Constant Details

    • INSTANCE

      public static final Utils INSTANCE
  • Method Details

    • values

      public static Utils[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Utils valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • encodeContent

      public static String encodeContent(String content)
      Encodes a content String in XML-clean form, converting characters to entities as necessary and removing control characters disallowed by XML. The null string will be converted to an empty string.
    • encodeValue

      public static String encodeValue(String value)
      Encodes an attribute value String in XML-clean form, converting quote characters to entities and removing control characters disallowed by XML.
    • isPropertyEmpty

      public static boolean isPropertyEmpty(Property property, PropertyArity arity)
      Checks if a property would produce an empty XML element, and returns true if it would.