public class HttpTrailer extends HttpContent implements MimeHeadersPacket
HttpContent message, which represents HTTP trailer message.
Applicable only for chunked HTTP messages.| Modifier and Type | Class and Description |
|---|---|
static class |
HttpTrailer.Builder
HttpTrailer message builder.
|
content, httpHeader, isLast| Modifier | Constructor and Description |
|---|---|
protected |
HttpTrailer(HttpHeader httpHeader) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(Header header,
String value)
Add the HTTP mime header.
|
void |
addHeader(String name,
String value)
Add the HTTP mime header.
|
static HttpTrailer.Builder |
builder(HttpHeader httpHeader)
Returns
HttpTrailer builder. |
boolean |
containsHeader(Header header)
Returns true, if the mime
Header is present
among the HttpHeader mime headers, otherwise returns false. |
boolean |
containsHeader(String name)
Returns true, if the mime header with the specific name is present
among the HttpHeader mime headers, or false otherwise.
|
static HttpTrailer |
create() |
static HttpTrailer |
create(HttpHeader httpHeader) |
String |
getHeader(Header header)
Get the value, of the specific HTTP mime header.
|
String |
getHeader(String name)
Get the value, of the specific HTTP mime header.
|
MimeHeaders |
getHeaders()
Get all
MimeHeaders, associated with the HttpHeader. |
boolean |
isLast()
Always true true for the trailer message.
|
static boolean |
isTrailer(HttpContent httpContent)
Returns true if passed
HttpContent is a HttpTrailder. |
void |
recycle() |
protected void |
reset()
Reset the internal state.
|
void |
setHeader(Header header,
String value)
Set the value, of the specific HTTP mime header.
|
void |
setHeader(String name,
String value)
Set the value, of the specific HTTP mime header.
|
protected void |
setHeaders(MimeHeaders mimeHeaders)
Set the mime headers.
|
append, getContent, getHttpHeader, isBroken, isContent, isHeader, setContent, setLastisHttpprotected HttpTrailer(HttpHeader httpHeader)
public static boolean isTrailer(HttpContent httpContent)
HttpContent is a HttpTrailder.httpContent - HttpContent is a HttpTrailder.public static HttpTrailer create()
public static HttpTrailer create(HttpHeader httpHeader)
public static HttpTrailer.Builder builder(HttpHeader httpHeader)
HttpTrailer builder.HttpTrailer.Builder.public final boolean isLast()
isLast in class HttpContentpublic MimeHeaders getHeaders()
MimeHeaders, associated with the HttpHeader.getHeaders in interface MimeHeadersPacketMimeHeaders, associated with the HttpHeader.public String getHeader(String name)
getHeader in interface MimeHeadersPacketname - the mime header name.public String getHeader(Header header)
getHeader in interface MimeHeadersPacketheader - the mime Headerpublic void setHeader(String name, String value)
setHeader in interface MimeHeadersPacketname - the mime header name.value - the mime header value.public void setHeader(Header header, String value)
setHeader in interface MimeHeadersPacketheader - the mime Header.value - the mime header value.public void addHeader(String name, String value)
addHeader in interface MimeHeadersPacketname - the mime header name.value - the mime header value.public void addHeader(Header header, String value)
addHeader in interface MimeHeadersPacketheader - the mime Header.value - the mime header value.public boolean containsHeader(String name)
containsHeader in interface MimeHeadersPacketname - the mime header name.public boolean containsHeader(Header header)
Header is present
among the HttpHeader mime headers, otherwise returns false.containsHeader in interface MimeHeadersPacketheader - the mime Header.Header is present
among the HttpHeader mime headers, otherwise returns false.protected void setHeaders(MimeHeaders mimeHeaders)
mimeHeaders - MimeHeaders.protected void reset()
reset in class HttpContentpublic void recycle()
recycle in interface Cacheablerecycle in class HttpContentCopyright © 2013 Oracle Corporation. All Rights Reserved.