public enum HttpTransferEncoding extends Enum<HttpTransferEncoding>
HttpMessage
and zero or more HttpChunk
s.Enum Constant and Description |
---|
CHUNKED
An HTTP message whose transfer encoding is
chunked as defined in
the section 3.6 of
RFC2616 so that the content is split into multiple chunks. |
SINGLE
A self-contained HTTP message which is not followed by any
HttpChunk s. |
STREAMED
An HTTP message whose transfer encoding is not
chunked , but
the length of its content is large enough so that the content is split into multiple
chunks. |
Modifier and Type | Method and Description |
---|---|
boolean |
isMultiple()
Returns
true if and only if a complete HTTP message is composed of an
HttpMessage and one or more HttpChunk s. |
boolean |
isSingle()
Returns
true if and only if a single HttpMessage represents a complete
HTTP message, not followed by any HttpChunk s. |
static HttpTransferEncoding |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HttpTransferEncoding[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpTransferEncoding CHUNKED
chunked
as defined in
the section 3.6 of
RFC2616 so that the content is split into multiple chunks. A complete HTTP message is
composed of the following:
HttpRequest
or HttpResponse
with empty contentHttpChunk
s whose content are not emptyHttpChunkTrailer
public static final HttpTransferEncoding STREAMED
chunked
, but
the length of its content is large enough so that the content is split into multiple
chunks. A complete HTTP message is composted of the following.
HttpRequest
or HttpResponse
with empty contentHttpChunk
s whose content are not emptyHttpChunkTrailer
CHUNKED
is that the transfer encoding of the streamed content
is not chunked
, and thus HttpMessageEncoder
will
encode the content as-is, rather than prepending HTTP chunk headers as defined in
the section 3.6 of
RFC2616.public static final HttpTransferEncoding SINGLE
HttpChunk
s.
A user can set the content of the message via HttpMessage.setContent(io.netty.buffer.ByteBuf)
.public static HttpTransferEncoding[] values()
for (HttpTransferEncoding c : HttpTransferEncoding.values()) System.out.println(c);
public static HttpTransferEncoding valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic boolean isMultiple()
true
if and only if a complete HTTP message is composed of an
HttpMessage
and one or more HttpChunk
s.public boolean isSingle()
true
if and only if a single HttpMessage
represents a complete
HTTP message, not followed by any HttpChunk
s.Copyright © 2008-2012 The Netty Project. All Rights Reserved.