- All Known Subinterfaces:
HttpMediaType
public interface MediaType
Media type support and known media types.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
fullType()
Deprecated.default boolean
Tests if this media type has provided Structured Syntaxsuffix
(RFC 6839).default boolean
Is the subtype a wildcard?default boolean
Is 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 returnstrue
if this media type has ANY suffix.- Returns:
true
if media type has specifiedsuffix
or has any suffix if parameter isnull
or empty.
-
text()