Interface MediaType
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn a media type parameterstatic MediaTypeParse a media type.parseAcceptHeader(String header) Parse an accept header which is a list of media typessubType()type()
-
Field Details
-
ANY
-
APPLICATION
-
APPLICATION_OCTET_STREAM
-
APPLICATION_JSON
-
TEXT
-
TEXT_PLAIN
-
-
Method Details
-
parseAcceptHeader
Parse an accept header which is a list of media types- Parameters:
header- the header- Returns:
- the list of media types
- Throws:
IllegalArgumentException- when the list is not valid
-
parse
-
type
String type()- Returns:
- the type or
nullwhen everything is matched (*)
-
subType
String subType()- Returns:
- the sub type or
nullwhen everything is matched (*)
-
accepts
- Returns:
- whether the
othermime type is accepted
-
parameter
-