Package com.helger.commons.mime
Class MimeTypeParameter
java.lang.Object
com.helger.commons.mime.MimeTypeParameter
This class represents a single MIME type parameter.
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetValue()getValueQuotedIfNecessary(EMimeQuoting eQuotingAlgorithm) inthashCode()booleantoString()
-
Constructor Details
-
MimeTypeParameter
Constructor.- Parameters:
sAttribute- Parameter name. Must neither benullnor empty and must matchMimeTypeParser.isToken(String).sValue- The value to use. May not benull. Must not be a valid MIME token.
-
-
Method Details
-
getAttribute
- Returns:
- The parameter name. Neither
nullnor empty and confirmed to be a valid MIME token.
-
getValue
- Returns:
- The value of the parameter. Never
null. No quoting or escaping is applied to this value!
-
isValueRequiringQuoting
public boolean isValueRequiringQuoting()- Returns:
trueif 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
- Parameters:
eQuotingAlgorithm- The quoting algorithm to be used. May not benull.- Returns:
- The value of the parameter. Neither
nullnor empty. If necessary, quoting is applied according to the passed algorithm.
-
equals
-
hashCode
public int hashCode() -
toString
-