Modifier and Type | Field and Description |
---|---|
static String |
NAME
The name of the header that this object represents.
|
Constructor and Description |
---|
ContentLengthHeader()
Constructs a new empty header.
|
ContentLengthHeader(Message<?> message)
Constructs a new header, initialized from the specified message.
|
ContentLengthHeader(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 |
getKey()
Returns the name of the header, as it would canonically appear within an HTTP message.
|
long |
getLength()
Returns a non-negative value when content length is known or
-1
when content length is not known. |
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 ContentLengthHeader()
public ContentLengthHeader(Message<?> message)
message
- the message to initialize the header from.public ContentLengthHeader(String string)
string
- the value to initialize the header from.public long getLength()
-1
when content length is not known.-1
when content length is not known.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.