java.lang.Object
com.sun.xml.ws.encoding.ContentType
This class represents a MIME ContentType value. It provides
methods to parse a ContentType string into individual components
and to generate a MIME style ContentType string.
- Version:
- 1.7, 02/03/27
- Author:
- John Mani
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn the MIME type string, without the parameters.getParameter
(String name) Return the specified parameter value.Return the primary type.Return the subType.
-
Constructor Details
-
ContentType
Constructor that takes a Content-Type string. The String is parsed into its constituents: primaryType, subType and parameters. A ParseException is thrown if the parse fails.- Parameters:
s
- the Content-Type string.- Throws:
jakarta.xml.ws.WebServiceException
- if the parse fails.
-
-
Method Details
-
getPrimaryType
Return the primary type.- Returns:
- the primary type
-
getSubType
Return the subType.- Returns:
- the subType
-
getBaseType
Return the MIME type string, without the parameters. The returned value is basically the concatenation of the primaryType, the '/' character and the secondaryType.- Returns:
- the type
-
getParameter
Return the specified parameter value. Returnsnull
if this parameter is absent.- Parameters:
name
- parameter name- Returns:
- parameter value
-