public interface ContentLengthHeader extends Header
The size of the message-body does not include the CRLF separating header fields and body. Any Content-Length greater than or equal to zero is a valid value. If no body is present in a message, then the Content-Length header field value MUST be set to zero.
ContentDispositionHeader
,
ContentTypeHeader
,
ContentEncodingHeader
,
ContentLanguageHeader
Modifier and Type | Field and Description |
---|---|
static String |
NAME
Name of ContentLengthHeader
|
Modifier and Type | Method and Description |
---|---|
int |
getContentLength()
Gets content-length of the message body.
|
void |
setContentLength(int contentLength)
Set content-length of ContentLengthHeader.
|
static final String NAME
void setContentLength(int contentLength) throws InvalidArgumentException
contentLength
- the content-length of the message body
as a decimal number of octets.InvalidArgumentException
- if contentLength is less than zero.int getContentLength()
Copyright © 2014. All Rights Reserved.