MimeType class
Represents a MIME Type, as originally defined in RFC 2046 and subsequently used in other Internet protocols including HTTP.
This class, however, does not contain support for the q-parameters used in HTTP content negotiation. Those can be found in the sub-class MediaType in the http folder.
- Implementers
Constructors
Properties
Methods
-
checkParameters(
String attribute, String value) → void -
getCharSet(
) → String -
- Return the character set, as indicated by a charset parameter, if any.
- @return the character set, or null if not available
- Return the character set, as indicated by a charset parameter, if any.
-
getParameter(
String name) → String -
- Return a generic parameter value, given a parameter name.
- @param name the parameter name
- @return the parameter value, or null if not present
- Return a generic parameter value, given a parameter name.
-
getParameters(
) → Map -
getSubtype(
) → String -
- Return the subtype.
-
getType(
) → String -
- Return the primary type.
-
includes(
MimeType other) → bool -
- Indicate whether this MediaType includes the given media type.
- For instance, text includes text/plain and text/html,
- and application+xml includes application/soap+xml, etc. This
- method is not symmetric.
- @param other the reference media type with which to compare
- @return true if this media type includes the given media type;
- false otherwise
- Indicate whether this MediaType includes the given media type.
-
isCompatibleWith(
MimeType other) → bool -
isConcrete(
) → bool -
- Indicates whether this media type is concrete, i.e. whether neither the type
- nor the subtype is a wildcard character.
- @return whether this media type is concrete
- Indicates whether this media type is concrete, i.e. whether neither the type
-
isQuotedString(
String s) → bool -
isWildcardSubtype(
) → bool -
- Indicates whether the subtype is the wildcard
- character or the wildcard character followed by a suffix.
- @return whether the subtype is a wildcard
- Indicates whether the subtype is the wildcard
-
isWildcardType(
) → bool -
- Indicates whether the getType is the wildcard character
- or not.
- Indicates whether the getType is the wildcard character
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
A string representation of this object. [...]
override
-
unquote(
String s) → String
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited
Static Properties
- PARAM_CHARSET → String
-
final
- WILDCARD_TYPE → String
-
final