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,
HeaderValue value)
Add the HTTP mime header.
|
void |
addHeader(Header header,
java.lang.String value)
Add the HTTP mime header.
|
void |
addHeader(java.lang.String name,
HeaderValue value)
Add the HTTP mime header.
|
void |
addHeader(java.lang.String name,
java.lang.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(java.lang.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) |
java.lang.String |
getHeader(Header header)
Get the value, of the specific HTTP mime header.
|
java.lang.String |
getHeader(java.lang.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,
HeaderValue value)
Set the value, of the specific HTTP mime header.
|
void |
setHeader(Header header,
java.lang.String value)
Set the value, of the specific HTTP mime header.
|
void |
setHeader(java.lang.String name,
HeaderValue value)
Set the value, of the specific HTTP mime header.
|
void |
setHeader(java.lang.String name,
java.lang.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 HttpHeaderpublic java.lang.String getHeader(java.lang.String name)
getHeader in interface MimeHeadersPacketname - the mime header namepublic java.lang.String getHeader(Header header)
getHeader in interface MimeHeadersPacketheader - the mime Headerpublic void setHeader(java.lang.String name,
java.lang.String value)
setHeader in interface MimeHeadersPacketname - the mime header namevalue - the mime header valuepublic void setHeader(java.lang.String name,
HeaderValue value)
setHeader in interface MimeHeadersPacketname - the mime header namevalue - the mime header valuepublic void setHeader(Header header, java.lang.String value)
setHeader in interface MimeHeadersPacketheader - the mime Headervalue - the mime header valuepublic void setHeader(Header header, HeaderValue value)
setHeader in interface MimeHeadersPacketheader - the mime Headervalue - the mime header valuepublic void addHeader(java.lang.String name,
java.lang.String value)
addHeader in interface MimeHeadersPacketname - the mime header namevalue - the mime header valuepublic void addHeader(java.lang.String name,
HeaderValue value)
addHeader in interface MimeHeadersPacketname - the mime header namevalue - the mime header valuepublic void addHeader(Header header, java.lang.String value)
addHeader in interface MimeHeadersPacketheader - the mime Headervalue - the mime header valuepublic void addHeader(Header header, HeaderValue value)
addHeader in interface MimeHeadersPacketheader - the mime Headervalue - the mime header valuepublic boolean containsHeader(java.lang.String name)
containsHeader in interface MimeHeadersPacketname - the mime header namepublic boolean containsHeader(Header header)
Header is present
among the HttpHeader mime headers, otherwise returns false.containsHeader in interface MimeHeadersPacketheader - the mime HeaderHeader is present
among the HttpHeader mime headers, otherwise returns falseprotected 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.