org.jboss.portal.common.net.media
Class ContentType
java.lang.Object
org.jboss.portal.common.net.media.ContentType
public class ContentType
- extends java.lang.Object
Represent a content type header value as defined by the section 5 of the
RFC2045
- Version:
- $Revision: 630 $
- Author:
- Julien Viet
|
Method Summary |
static ContentType |
create(java.lang.String contentTypeValue)
Creates a content type header value by parsing a content type value. |
MediaType |
getMediaType()
|
java.util.List<Parameter> |
getParameters()
|
java.lang.String |
getValue()
Returns the value of the content type which is the concatenation of the media type name
followed by the parameters. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContentType
public ContentType(MediaType mediaType,
java.util.List<Parameter> parameters)
ContentType
public ContentType(MediaType mediaType)
create
public static ContentType create(java.lang.String contentTypeValue)
throws java.lang.IllegalArgumentException
- Creates a content type header value by parsing a content type value. The content type value format is defined
by the section 5.1 of the RFC2045 but does not
take in account the prefix "Content-Type" ":" of the content production rule of the grammar.
- Parameters:
contentTypeValue - the content type value
- Returns:
-
- Throws:
java.lang.IllegalArgumentException - if the
getMediaType
public MediaType getMediaType()
getParameters
public java.util.List<Parameter> getParameters()
getValue
public java.lang.String getValue()
- Returns the value of the content type which is the concatenation of the media type name
followed by the parameters.
- Returns:
- the value
Copyright © 2008. All Rights Reserved.