public abstract static class HttpHeader.Builder<T extends HttpHeader.Builder>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected HttpHeader |
packet |
| Constructor and Description |
|---|
HttpHeader.Builder() |
| Modifier and Type | Method and Description |
|---|---|
T |
chunked(boolean isChunked)
Set true, if this
HttpPacket content will be transferred
in chunking mode, or false if case of fixed-length message. |
T |
contentLength(long contentLength)
Set the content-length of this
HttpPacket. |
T |
contentType(java.lang.String contentType)
Set the content-type of this
HttpPacket. |
T |
header(Header header,
java.lang.String value)
Add the HTTP mime header.
|
T |
header(java.lang.String name,
java.lang.String value)
Add the HTTP mime header.
|
T |
protocol(Protocol protocol)
Set the HTTP message protocol version.
|
T |
protocol(java.lang.String protocol)
Set the HTTP message protocol version.
|
T |
upgrade(java.lang.String upgrade)
Set the HTTP upgrade type.
|
protected HttpHeader packet
public final T protocol(Protocol protocol)
protocol - Protocolpublic final T protocol(java.lang.String protocol)
protocol - protocol version in format "HTTP/1.x".public final T chunked(boolean isChunked)
HttpPacket content will be transferred
in chunking mode, or false if case of fixed-length message.isChunked - true, if this HttpPacket content
will be transferred in chunking mode, or false if case
of fixed-length message.public final T contentLength(long contentLength)
HttpPacket. Applicable only in case
of fixed-length HTTP message.contentLength - the content-length of this HttpPacket.
Applicable only in case of fixed-length HTTP message.public final T contentType(java.lang.String contentType)
HttpPacket.contentType - the content-type of this HttpPacket.public final T upgrade(java.lang.String upgrade)
upgrade - the type of upgrade.public final T header(java.lang.String name, java.lang.String value)
name - the mime header name.value - the mime header value.Copyright © 2014 Oracle Corporation. All Rights Reserved.