Package com.sun.xml.ws.encoding
Class ContentType
- java.lang.Object
-
- com.sun.xml.ws.encoding.ContentType
-
public final class ContentType extends Object
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
Constructors Constructor Description ContentType(String s)Constructor that takes a Content-Type string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBaseType()Return the MIME type string, without the parameters.StringgetParameter(String name)Return the specified parameter value.com.sun.xml.ws.encoding.ParameterListgetParameterList()Return a ParameterList object that holds all the available parameters.StringgetPrimaryType()Return the primary type.StringgetSubType()Return the subType.
-
-
-
Constructor Detail
-
ContentType
public ContentType(String s) throws jakarta.xml.ws.WebServiceException
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 Detail
-
getPrimaryType
public String getPrimaryType()
Return the primary type.- Returns:
- the primary type
-
getSubType
public String getSubType()
Return the subType.- Returns:
- the subType
-
getBaseType
public String 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
public String getParameter(String name)
Return the specified parameter value. Returnsnullif this parameter is absent.- Parameters:
name- parameter name- Returns:
- parameter value
-
getParameterList
public com.sun.xml.ws.encoding.ParameterList getParameterList()
Return a ParameterList object that holds all the available parameters. Returns null if no parameters are available.- Returns:
- ParameterList
-
-