- All Known Subinterfaces:
HttpMediaType
public interface MediaType
Media type support and known media types.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringfullType()Deprecated.default booleanTests if this media type has provided Structured Syntaxsuffix(RFC 6839).default booleanIs the subtype a wildcard?default booleanIs the type a wildcard?subtype()Subtype, such asyaml.text()Full type, such asapplication/yaml.type()Type, such asapplication.
-
Method Details
-
type
String type()Type, such asapplication.- Returns:
- type part of the media type
-
subtype
String subtype()Subtype, such asyaml.- Returns:
- subtype part of the media type
-
fullType
Deprecated.usetext()Full type, such asapplication/yaml.- Returns:
- full media type string
-
text
String text()Full type, such asapplication/yaml.- Returns:
- full media type string
-
isWildcardType
default boolean isWildcardType()Is the type a wildcard?- Returns:
- whether this is a wildcard type
-
isWildcardSubtype
default boolean isWildcardSubtype()Is the subtype a wildcard?- Returns:
- whether this is a wildcard subtype
-
hasSuffix
Tests if this media type has provided Structured Syntaxsuffix(RFC 6839).- Parameters:
suffix- Suffix with or without '+' prefix. If null or empty then returnstrueif this media type has ANY suffix.- Returns:
trueif media type has specifiedsuffixor has any suffix if parameter isnullor empty.
-
text()