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