Class MimeTypeParameter

java.lang.Object
com.helger.commons.mime.MimeTypeParameter

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

  • Method Details

    • 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.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object