Package org.bedework.util.servlet
Class ContentType
- java.lang.Object
-
- org.bedework.util.servlet.ContentType
-
- All Implemented Interfaces:
Serializable
public class ContentType extends Object implements Serializable
Class to represent a content type.- Author:
- Mike Douglass
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classContentType.ParamA content type parameter
-
Constructor Summary
Constructors Constructor Description ContentType(String type)ContentType(String type, List<ContentType.Param> params)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParam(ContentType.Param val)static ContentTypedecode(String val)Stringencode()List<ContentType.Param>getParams()StringgetType()StringtoString()
-
-
-
Constructor Detail
-
ContentType
public ContentType(String type)
- Parameters:
type-
-
ContentType
public ContentType(String type, List<ContentType.Param> params)
- Parameters:
type-params-
-
-
Method Detail
-
getType
public String getType()
- Returns:
- content type value
-
getParams
public List<ContentType.Param> getParams()
- Returns:
- params
-
addParam
public void addParam(ContentType.Param val)
- Parameters:
val-
-
encode
public String encode()
- Returns:
- encoded value in form type *(";" param)
-
decode
public static ContentType decode(String val)
- Parameters:
val-- Returns:
- parsed content type
-
-