|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.noderunner.http.ContentType
public final class ContentType
Content type field value class, see RFC 2045 section 5.1 on this. Immutable class.
Nested Class Summary | |
---|---|
static class |
ContentType.Parameter
Content type parameter, see parameter definition in RFC 2045. |
static class |
ContentType.StandardType
Standard content types. |
Constructor Summary | |
---|---|
ContentType(String type,
String subtype)
Constructs a new ContentType. |
|
ContentType(String type,
String subtype,
List<ContentType.Parameter> param)
Constructs a new ContentType. |
Method Summary | |
---|---|
static void |
checkToken(String t)
Checks a token syntax. |
ContentType.Parameter |
getParameter(String attribute)
Returns the first parameter matching this attribute string. |
List<ContentType.Parameter> |
getParameters()
Returns parameters, unmodifiable. |
String |
getParameterValue(String attribute)
Returns the first parameter value matching this attribute string. |
String |
getSubtype()
Returns content sub type. |
String |
getType()
Returns type. |
static ContentType |
parse(String string)
Factory method, parsing a content type line and generating a content type object. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ContentType(String type, String subtype)
public ContentType(String type, String subtype, List<ContentType.Parameter> param)
type
- non-null typesubtype
- non-null subtypeparam
- list of parameters, optionally nullMethod Detail |
---|
public static ContentType parse(String string)
public static void checkToken(String t)
IllegalArgumentException
- if token is invalidpublic String getType()
public String getSubtype()
public List<ContentType.Parameter> getParameters()
public ContentType.Parameter getParameter(String attribute)
public String getParameterValue(String attribute)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |