The relevant productions from RFC 2045 and RFC 822 are:
content := "Content-Type" ":" type "/" subtype *(";" parameter) parameter := attribute "=" value attribute := token value := token / quoted-string token := 1*<any (US-ASCII) CHAR except SPACE, CTLs, or tspecials> tspecials := "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" / <"> / "/" / "[" / "]" / "?" / "=" quoted-string := <"> *(qtext/quoted-pair) <"> qtext := <any CHAR excepting <">, "\" & CR, and including linear-white-space> quoted-pair := "\" CHAR
This class is similar to {@link MimeType} and JavaMail's ContentType
class, but thefollowing differences exist:
Another reason for the existence of this class is to avoid a dependency on JavaMail.
Note that this class doesn't override {@link Object#equals(Object)} because there is nomeaningful way to compare content types with parameters.
|
|