public final class CompressedHeadersBuilder extends Object
SynStreamFrame
,
SynReplyFrame
,
HeadersFrame
Modifier and Type | Method and Description |
---|---|
Buffer |
build(Deflater deflater) |
CompressedHeadersBuilder |
contentLength(long contentLength)
Set the content-length of this header.
|
CompressedHeadersBuilder |
contentType(String contentType)
Set the content-type of this header.
|
static Deflater |
createSpdyDeflater()
Utility method, which helps to create Spdy
Deflater with predefined
Spdy compression dictionary. |
CompressedHeadersBuilder |
header(Header header,
String value)
Add the SPDY/HTTP mime header.
|
CompressedHeadersBuilder |
header(String name,
String value)
Add the SPDY/HTTP mime header.
|
CompressedHeadersBuilder |
host(String host)
Set the the hostport (See RFC1738 [RFC1738]) portion of the URL for this
request header (e.g.
|
CompressedHeadersBuilder |
method(Method method)
Set the the HTTP method for this request.
|
CompressedHeadersBuilder |
method(String method)
Set the the HTTP method for this request.
|
static CompressedHeadersBuilder |
newInstance()
Returns the
CompressedHeadersBuilder instance. |
CompressedHeadersBuilder |
path(String path)
Set the url-path for required url with "/" prefixed.
|
CompressedHeadersBuilder |
scheme(String scheme)
Set the scheme portion of the URL for this request header (e.g.
|
CompressedHeadersBuilder |
status(HttpStatus status)
Set the HTTP response status code (e.g.
|
CompressedHeadersBuilder |
status(int status)
Set the HTTP response status code (e.g.
|
CompressedHeadersBuilder |
status(String status)
Set the HTTP response status code (e.g.
|
CompressedHeadersBuilder |
version(Protocol version)
Set the the HTTP version of this request (e.g.
|
CompressedHeadersBuilder |
version(String version)
Set the the HTTP version of this request (e.g.
|
public static Deflater createSpdyDeflater()
Deflater
with predefined
Spdy compression dictionary.public static CompressedHeadersBuilder newInstance()
CompressedHeadersBuilder
instance.public final CompressedHeadersBuilder contentLength(long contentLength)
contentLength
- the content-length of this HttpPacket
.
Applicable only in case of fixed-length HTTP message.public final CompressedHeadersBuilder contentType(String contentType)
contentType
- the content-type of this HttpPacket
.public final CompressedHeadersBuilder method(Method method)
method
- the method of this header.public final CompressedHeadersBuilder method(String method)
method
- the method of this header.public final CompressedHeadersBuilder path(String path)
path
- the path of this header.public final CompressedHeadersBuilder version(Protocol version)
version
- the HTTP version of this header.public final CompressedHeadersBuilder version(String version)
version
- the HTTP version of this header.public final CompressedHeadersBuilder host(String host)
host
- the hostport.public final CompressedHeadersBuilder scheme(String scheme)
path
- the path of this header.public final CompressedHeadersBuilder status(int status)
path
- the path of this header.public final CompressedHeadersBuilder status(HttpStatus status)
path
- the path of this header.public final CompressedHeadersBuilder status(String status)
path
- the path of this header.public final CompressedHeadersBuilder header(String name, String value)
name
- the mime header name.value
- the mime header value.public final CompressedHeadersBuilder header(Header header, String value)
header
- the mime Header
.value
- the mime header value.public Buffer build(Deflater deflater) throws IOException
IOException
Copyright © 2015 Oracle Corporation. All rights reserved.