| java.lang.Object org.apache.tapestry.internal.util.ContentType
ContentType | final public class ContentType (Code) | | Represents an HTTP content type. Allows to set various elements like the mime type, the character
set, and other parameters. This is similar to a number of other implementations of the same
concept in JAF, etc. We have created this simple implementation to avoid including the whole
libraries.
|
Constructor Summary | |
public | ContentType() Creates a new empty content type. | public | ContentType(String contentType) Creates a new content type from the argument. |
ContentType | public ContentType()(Code) | | Creates a new empty content type.
|
ContentType | public ContentType(String contentType)(Code) | | Creates a new content type from the argument. The format of the argument has to be
basetype/subtype(;key=value)*
Parameters: contentType - the content type that needs to be represented |
equals | public boolean equals(Object o)(Code) | | Returns true only if the other object is another instance of ContentType, and has the ssame
baseType, subType and set of parameters.
|
getBaseType | public String getBaseType()(Code) | | the base type of the content type |
getMimeType | public String getMimeType()(Code) | | the MIME type of the content type |
getParameter | public String getParameter(String key)(Code) | | Parameters: key - the name of the content type parameter the value of the content type parameter |
getParameterNames | public List<String> getParameterNames()(Code) | | the list of names of parameters in this content type, in alphabetical order. |
getSubType | public String getSubType()(Code) | | the sub-type of the content type |
parse | public void parse(String contentType)(Code) | | Parses the argument and configures the content type accordingly. The format of the argument
has to be type/subtype(;key=value)*
Parameters: contentType - the content type that needs to be represented |
setBaseType | public void setBaseType(String baseType)(Code) | | Parameters: baseType - |
setParameter | public void setParameter(String key, String value)(Code) | | Parameters: key - the name of the content type parameter Parameters: value - the value of the content type parameter |
setSubType | public void setSubType(String subType)(Code) | | Parameters: subType - |
toString | public String toString()(Code) | | the string representation of this content type. Same as unparse(). |
unparse | public String unparse()(Code) | | the string representation of this content type |
|
|