Modifier and Type | Field and Description |
---|---|
static String |
NAME
The name of the header that this object represents.
|
Constructor and Description |
---|
ContentTypeHeader()
Constructs a new empty header.
|
ContentTypeHeader(Message<?> message)
Constructs a new header, initialized from the specified message.
|
ContentTypeHeader(String string)
Constructs a new header, initialized from the specified string value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
void |
fromMessage(Message<?> message)
Populates the content of the header from the specified message.
|
void |
fromString(String string)
Populates the content of the header from the specified string value.
|
String |
getBoundary()
Returns the encapsulation boundary or
null if none specified. |
Charset |
getCharset()
Returns the character set encoding used to encode the message, or
null if no character set was specified. |
String |
getKey()
Returns the name of the header, as it would canonically appear within an HTTP message.
|
String |
getType()
Returns the media type of the underlying data or
null if none specified. |
int |
hashCode() |
void |
toMessage(Message<?> message)
Sets the header in the specified message.
|
String |
toString()
Returns the header as a single string value.
|
public static final String NAME
public ContentTypeHeader()
public ContentTypeHeader(Message<?> message)
message
- the message to initialize the header from.public ContentTypeHeader(String string)
string
- the value to initialize the header from.public String getType()
null
if none specified.null
if none specified.public Charset getCharset()
null
if no character set was specified.null
if empty.IllegalCharsetNameException
- if the given charset name is illegal.UnsupportedCharsetException
- if no support for the named charset is available.public String getBoundary()
null
if none specified.null
if none specified.public String getKey()
Header
public void fromMessage(Message<?> message)
Header
fromMessage
in interface Header
message
- The message to get the content of the header from.public void fromString(String string)
Header
fromString
in interface Header
string
- The string to populate the content of the header from.public void toMessage(Message<?> message)
Header
public String toString()
Header
null
.Copyright © 2014 ForgeRock AS. All rights reserved.