Class MimeTypeParameter


  • @Immutable
    public class MimeTypeParameter
    extends Object
    This class represents a single MIME type parameter.
    Author:
    Philip Helger
    • Method Detail

      • getAttribute

        @Nonnull
        @Nonempty
        public String getAttribute()
        Returns:
        The parameter name. Neither null nor empty and confirmed to be a valid MIME token.
      • getValue

        @Nonnull
        public String getValue()
        Returns:
        The value of the parameter. Never null. No quoting or escaping is applied to this value!
      • isValueRequiringQuoting

        public boolean isValueRequiringQuoting()
        Returns:
        true if the value required quoting/escaping. This is determined by checking, if the value is a valid MIME token in which case no quoting is necessary.
      • getValueQuotedIfNecessary

        @Nonnull
        @Nonempty
        public String getValueQuotedIfNecessary​(@Nonnull
                                                EMimeQuoting eQuotingAlgorithm)
        Parameters:
        eQuotingAlgorithm - The quoting algorithm to be used. May not be null.
        Returns:
        The value of the parameter. Neither null nor empty. If necessary, quoting is applied according to the passed algorithm.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object