public class DefaultHttpChunkTrailer extends Object implements HttpChunkTrailer
HttpChunkTrailer
implementation.LAST_CHUNK
Constructor and Description |
---|
DefaultHttpChunkTrailer() |
Modifier and Type | Method and Description |
---|---|
void |
addHeader(String name,
Object value)
Adds a new trailing header with the specified name and value.
|
void |
clearHeaders()
Removes all trailing headers from this trailer.
|
boolean |
containsHeader(String name)
Returns
true if and only if there is a trailing header with
the specified header name. |
ChannelBuffer |
getContent()
Returns the content of this chunk.
|
String |
getHeader(String name)
Returns the trailing header value with the specified header name.
|
Set<String> |
getHeaderNames()
Returns the
Set of all trailing header names that this trailer
contains. |
List<Map.Entry<String,String>> |
getHeaders()
Returns the all header names and values that this trailer contains.
|
List<String> |
getHeaders(String name)
Returns the trailing header values with the specified header name.
|
boolean |
isLast()
Always returns
true . |
void |
removeHeader(String name)
Removes the trailing header with the specified name.
|
void |
setContent(ChannelBuffer content)
Sets the content of this chunk.
|
void |
setHeader(String name,
Iterable<?> values)
Sets a new trailing header with the specified name and values.
|
void |
setHeader(String name,
Object value)
Sets a new trailing header with the specified name and value.
|
public boolean isLast()
HttpChunkTrailer
true
.isLast
in interface HttpChunk
isLast
in interface HttpChunkTrailer
public void addHeader(String name, Object value)
HttpChunkTrailer
addHeader
in interface HttpChunkTrailer
public void setHeader(String name, Object value)
HttpChunkTrailer
setHeader
in interface HttpChunkTrailer
public void setHeader(String name, Iterable<?> values)
HttpChunkTrailer
setHeader
in interface HttpChunkTrailer
public void removeHeader(String name)
HttpChunkTrailer
removeHeader
in interface HttpChunkTrailer
public void clearHeaders()
HttpChunkTrailer
clearHeaders
in interface HttpChunkTrailer
public String getHeader(String name)
HttpChunkTrailer
getHeader
in interface HttpChunkTrailer
null
if there is no such headerpublic List<String> getHeaders(String name)
HttpChunkTrailer
getHeaders
in interface HttpChunkTrailer
List
of header values. An empty list if there is no
such header.public List<Map.Entry<String,String>> getHeaders()
HttpChunkTrailer
getHeaders
in interface HttpChunkTrailer
List
of the header name-value pairs. An empty list
if there is no header in this trailer.public boolean containsHeader(String name)
HttpChunkTrailer
true
if and only if there is a trailing header with
the specified header name.containsHeader
in interface HttpChunkTrailer
public Set<String> getHeaderNames()
HttpChunkTrailer
Set
of all trailing header names that this trailer
contains.getHeaderNames
in interface HttpChunkTrailer
public ChannelBuffer getContent()
HttpChunk
ChannelBuffers.EMPTY_BUFFER
will be returned.getContent
in interface HttpChunk
public void setContent(ChannelBuffer content)
HttpChunk
setContent
in interface HttpChunk
Copyright © 2008-2014 The Netty Project. All Rights Reserved.