- java.lang.Object
-
- swim.http.HttpPart
-
- swim.http.HttpHeader
-
- swim.http.header.ContentType
-
- All Implemented Interfaces:
Debug
public final class ContentType extends HttpHeader
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContentType
create(String mediaType)
static ContentType
create(String type, String subtype)
static ContentType
create(String type, String subtype, HashTrieMap<String,String> params)
static ContentType
create(MediaType mediaType)
<T> Output<T>
debug(Output<T> output)
Writes a developer readable, debug-formatted string representation of this object tooutput
.boolean
equals(Object other)
String
getParam(String key)
int
hashCode()
String
lowerCaseName()
MediaType
mediaType()
String
name()
ContentType
param(String key, String value)
HashTrieMap<String,String>
params()
static Parser<ContentType>
parseHttpValue(Input input, HttpParser http)
String
subtype()
String
type()
Writer<?,?>
writeHttpValue(Output<?> output, HttpWriter http)
-
Methods inherited from class swim.http.HttpHeader
httpWriter, isBlank, parseHttp, toString, value, writeHttp
-
Methods inherited from class swim.http.HttpPart
httpWriter, toHttp, writeHttp
-
-
-
-
Method Detail
-
lowerCaseName
public String lowerCaseName()
- Specified by:
lowerCaseName
in classHttpHeader
-
name
public String name()
- Specified by:
name
in classHttpHeader
-
mediaType
public MediaType mediaType()
-
type
public String type()
-
subtype
public String subtype()
-
params
public HashTrieMap<String,String> params()
-
param
public ContentType param(String key, String value)
-
writeHttpValue
public Writer<?,?> writeHttpValue(Output<?> output, HttpWriter http)
- Specified by:
writeHttpValue
in classHttpHeader
-
debug
public <T> Output<T> debug(Output<T> output)
Description copied from interface:Debug
Writes a developer readable, debug-formatted string representation of this object tooutput
.- Specified by:
debug
in interfaceDebug
- Specified by:
debug
in classHttpHeader
- Returns:
- the continuation of the
output
.
-
create
public static ContentType create(MediaType mediaType)
-
create
public static ContentType create(String type, String subtype, HashTrieMap<String,String> params)
-
create
public static ContentType create(String type, String subtype)
-
create
public static ContentType create(String mediaType)
-
parseHttpValue
public static Parser<ContentType> parseHttpValue(Input input, HttpParser http)
-
-