| Modifier and Type | Field and Description |
|---|---|
| private ParameterList | |
| private String | |
| private String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ContentType(String
primary type primaryType, String subType subType, ParameterList ParameterList list)Constructor. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public String | Returns: parameter valuethe parameter name name)Return the specified parameter value. |
| public ParameterList | Returns: ParameterListReturn a ParameterList object that holds all the available parameters. |
| public String | |
| public String | |
| public boolean | Returns: true if it matchesContentType to compare this against cType)Match with the specified ContentType object. |
| public boolean | |
| public void | |
| public void | |
| public void | |
| public void | |
| public String | Returns: RFC2045 style stringOverrides java. |
| list | back to summary |
|---|---|
| private ParameterList list | |
| primaryType | back to summary |
|---|---|
| private String primaryType | |
| subType | back to summary |
|---|---|
| private String subType | |
| ContentType | back to summary |
|---|---|
| public ContentType() No-arg Constructor. | |
| ContentType | back to summary |
|---|---|
| public ContentType(String primaryType, String subType, ParameterList list) Constructor.
| |
| ContentType | back to summary |
|---|---|
| public ContentType(String s) throws ParseException 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.
| |
| getBaseType | back to summary |
|---|---|
| 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.
| |
| getParameter | back to summary |
|---|---|
| public String getParameter(String name) Return the specified parameter value. Returns | |
| getParameterList | back to summary |
|---|---|
| public ParameterList getParameterList() Return a ParameterList object that holds all the available parameters. Returns null if no parameters are available.
| |
| getPrimaryType | back to summary |
|---|---|
| public String getPrimaryType() Return the primary type.
| |
| getSubType | back to summary |
|---|---|
| public String getSubType() Return the subType.
| |
| match | back to summary |
|---|---|
| public boolean match(ContentType cType) Match with the specified ContentType object. This method
compares only the
For example, this method will return
| |
| match | back to summary |
|---|---|
| public boolean match(String s) Match with the specified content-type string. This method
compares only the
For example, this method will return
| |
| setParameter | back to summary |
|---|---|
| public void setParameter(String name, String value) Set the specified parameter. If this parameter already exists, it is replaced by this new value. | |
| setParameterList | back to summary |
|---|---|
| public void setParameterList(ParameterList list) Set a new ParameterList.
| |
| setPrimaryType | back to summary |
|---|---|
| public void setPrimaryType(String primaryType) Set the primary type. Overrides existing primary type.
| |
| setSubType | back to summary |
|---|---|
| public void setSubType(String subType) Set the subType. Replaces the existing subType.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Retrieve a RFC2045 style string representation of this Content-Type. Returns an empty string if the conversion failed. | |