Enum Canonicalization

    • Enum Constant Detail

      • SIMPLE

        public static final Canonicalization SIMPLE
        The "simple" canonicalization algorithm. The body canonicalization algorithm converts *CRLF at the end of the body to a single CRLF.
      • RELAXED

        public static final Canonicalization RELAXED
        The "relaxed" canonicalization algorithm. The body canonicalization algorithm MUST reduce whitespace and ignore all empty lines at the end of the message body.
    • Method Detail

      • values

        public static Canonicalization[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Canonicalization c : Canonicalization.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Canonicalization valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • getType

        public final String getType()
      • canonicalizeHeader

        public abstract String canonicalizeHeader​(String name,
                                                  String value)
      • canonicalizeBody

        public abstract String canonicalizeBody​(String body)