Package org.jdrupes.httpcodec.types
Class MediaBase.MediaTypePair
java.lang.Object
org.jdrupes.httpcodec.types.MediaBase.MediaTypePair
- Enclosing class:
- MediaBase
Represents the tuple media top-level type and subtype,
including a media range (type or subtype
equals “
*”).-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMediaTypePair(String type, String subtype) Create a new object with the given type and subtype. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic MediaBase.MediaTypePairfromString(String text) Create a main type from its textual representation.inthashCode()subtype()Returns the subtypeReturns the top-level type.toString()
-
Field Details
-
ALL_MEDIA
-
-
Constructor Details
-
MediaTypePair
Create a new object with the given type and subtype.- Parameters:
type- the typesubtype- the subtype
-
-
Method Details
-
fromString
Create a main type from its textual representation.- Parameters:
text- the textual representation- Returns:
- the result
- Throws:
ParseException- if the text is ill-formed
-
topLevelType
Returns the top-level type.- Returns:
- the type
-
subtype
Returns the subtype- Returns:
- the subtype
-
toString
-
hashCode
-
equals
-