|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry.util.ContentType
public class ContentType
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 | |
---|---|
ContentType()
Creates a new empty content type |
|
ContentType(String contentType)
Creates a new content type from the argument. |
Method Summary | |
---|---|
String |
getBaseType()
|
String |
getMimeType()
|
String |
getParameter(String key)
|
String[] |
getParameterNames()
|
String |
getSubType()
|
void |
parse(String contentType)
Parses the argument and configures the content type accordingly. |
void |
setBaseType(String baseType)
|
void |
setParameter(String key,
String value)
|
void |
setSubType(String subType)
|
String |
toString()
|
String |
unparse()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ContentType()
public ContentType(String contentType)
contentType
- the content type that needs to be representedMethod Detail |
---|
public String getBaseType()
public void setBaseType(String baseType)
baseType
- public String getSubType()
public void setSubType(String subType)
subType
- public String getMimeType()
public String[] getParameterNames()
public String getParameter(String key)
key
- the name of the content type parameter
public void setParameter(String key, String value)
key
- the name of the content type parametervalue
- the value of the content type parameterpublic void parse(String contentType)
contentType
- the content type that needs to be representedpublic String unparse()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |