Home » tapestry-src-5.0.19 » org.apache.tapestry5 » [javadoc | source]
public final class: ContentType [javadoc | source]
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.
 public ContentType() 
 public ContentType(String contentType) 
    Creates a new content type from the argument. The format of the argument has to be basetype/subtype(;key=value)*
    contentType - the content type that needs to be represented
 public ContentType(String contentType,
    String charset) 
    Creates a new content type with the given MIME type and charset
Method from org.apache.tapestry5.ContentType Summary:
equals,   getBaseType,   getCharset,   getMimeType,   getParameter,   getParameterNames,   getSubType,   parse,   setBaseType,   setParameter,   setSubType,   toString,   unparse
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tapestry5.ContentType Detail:
 public boolean equals(Object o) 
    Returns true only if the other object is another instance of ContentType, and has the ssame baseType, subType and set of parameters.
 public String getBaseType() 
 public String getCharset() 
 public String getMimeType() 
 public String getParameter(String key) 
 public List<String> getParameterNames() 
 public String getSubType() 
 public  void parse(String contentType) 
    Parses the argument and configures the content type accordingly. The format of the argument has to be type/subtype(;key=value)*
 public  void setBaseType(String baseType) 
 public  void setParameter(String key,
    String value) 
 public  void setSubType(String subType) 
 public String toString() 
 public String unparse()