Representation of a content type. An instance of ContentType is immutable.
- Implements
Static Properties
Static Methods
-
parse(
String value) → ContentType -
Creates a new content type object from parsing a Content-Type header value. As primary type, sub type and parameter names and values are not case sensitive all these values will be converted to lower case. Parsing this string…
Constructors
- ContentType(String primaryType, String subType, {String charset, Map<String, String> parameters})
-
Creates a new content type object setting the primary type and sub type. The charset and additional parameters can also be set using
charset
andparameters
. If charset is passed andparameters
contains charset as well the passedcharset
will override the value in parameters. Keys passed in parameters will be converted to lower case. Thecharset
entry, whether passed ascharset
or inparameters
, will have its value converted to lower-case.factory
Properties
- charset → String
-
Gets the character set.
read-only - hashCode → int
-
Get a hash code for this object.…
read-only, inherited - mimeType → String
-
Gets the mime-type, without any parameters.
read-only - parameters → Map<String, String>
-
Gets the map of parameters.…
read-only, inherited - primaryType → String
-
Gets the primary type.
read-only - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited - subType → String
-
Gets the sub type.
read-only - value → String
-
Gets the header value.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.…
inherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
noSuchMethod is invoked when users invoke a non-existent method on an object. The name of the method and the arguments of the invocation are passed to noSuchMethod in an Invocation. If noSuchMethod returns a value, that value becomes the result of the original invocation.…
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited