程序包 | 说明 |
---|---|
io.netty.handler.codec.http |
Benchmarks for
io.netty.handler.codec.http . |
io.netty.handler.codec.http2 |
Benchmarks for
io.netty.handler.codec.http2 . |
io.netty.handler.codec.rtsp |
An RTSP
extension based on the HTTP codec.
|
io.netty.handler.codec.spdy |
Encoder, decoder, session handler and their related message types for the SPDY protocol.
|
限定符和类型 | 类和说明 |
---|---|
class |
HttpObjectEncoder<H extends HttpMessage>
|
限定符和类型 | 接口和说明 |
---|---|
interface |
FullHttpMessage
Combines
HttpMessage and LastHttpContent into one
message. |
interface |
FullHttpRequest
Combine the
HttpRequest and FullHttpMessage , so the request is a complete HTTP
request. |
interface |
FullHttpResponse
Combination of a
HttpResponse and FullHttpMessage . |
interface |
HttpRequest
An HTTP request.
|
interface |
HttpResponse
An HTTP response.
|
限定符和类型 | 类和说明 |
---|---|
class |
DefaultFullHttpRequest
Default implementation of
FullHttpRequest . |
class |
DefaultFullHttpResponse
Default implementation of a
FullHttpResponse . |
class |
DefaultHttpMessage
The default
HttpMessage implementation. |
class |
DefaultHttpRequest
The default
HttpRequest implementation. |
class |
DefaultHttpResponse
The default
HttpResponse implementation. |
限定符和类型 | 方法和说明 |
---|---|
protected HttpMessage |
HttpResponseDecoder.createInvalidMessage() |
protected HttpMessage |
HttpRequestDecoder.createInvalidMessage() |
protected abstract HttpMessage |
HttpObjectDecoder.createInvalidMessage() |
protected HttpMessage |
HttpResponseDecoder.createMessage(java.lang.String[] initialLine) |
protected HttpMessage |
HttpRequestDecoder.createMessage(java.lang.String[] initialLine) |
protected abstract HttpMessage |
HttpObjectDecoder.createMessage(java.lang.String[] initialLine) |
HttpMessage |
HttpMessage.setProtocolVersion(HttpVersion version)
Set the protocol version of this
HttpMessage |
HttpMessage |
DefaultHttpMessage.setProtocolVersion(HttpVersion version) |
限定符和类型 | 方法和说明 |
---|---|
static void |
HttpHeaders.addDateHeader(HttpMessage message,
java.lang.CharSequence name,
java.util.Date value)
已过时。
Use
HttpHeaders.add(CharSequence, Object) instead.
Adds a new date header with the specified name and value. The specified
value is formatted as defined in
RFC2616 |
static void |
HttpHeaders.addDateHeader(HttpMessage message,
java.lang.String name,
java.util.Date value)
已过时。
Use
HttpHeaders.add(CharSequence, Object) instead. |
static void |
HttpHeaders.addHeader(HttpMessage message,
java.lang.CharSequence name,
java.lang.Object value)
已过时。
Use
HttpHeaders.add(CharSequence, Object) instead.
Adds a new header with the specified name and value.
If the specified value is not a String , it is converted into a
String by Object.toString() , except for Date
and Calendar which are formatted to the date format defined in
RFC2616. |
static void |
HttpHeaders.addHeader(HttpMessage message,
java.lang.String name,
java.lang.Object value)
已过时。
Use
HttpHeaders.add(CharSequence, Object) instead. |
static void |
HttpHeaders.addIntHeader(HttpMessage message,
java.lang.CharSequence name,
int value)
已过时。
Use
HttpHeaders.addInt(CharSequence, int) instead.
Adds a new integer header with the specified name and value. |
static void |
HttpHeaders.addIntHeader(HttpMessage message,
java.lang.String name,
int value)
已过时。
Use
HttpHeaders.add(CharSequence, Iterable) instead. |
protected FullHttpMessage |
HttpObjectAggregator.beginAggregation(HttpMessage start,
ByteBuf content) |
static void |
HttpHeaders.clearHeaders(HttpMessage message)
已过时。
Use
HttpHeaders.clear() instead.
Removes all headers from the specified message. |
static java.nio.charset.Charset |
HttpUtil.getCharset(HttpMessage message)
Fetch charset from message's Content-Type header.
|
static java.nio.charset.Charset |
HttpUtil.getCharset(HttpMessage message,
java.nio.charset.Charset defaultCharset)
Fetch charset from message's Content-Type header.
|
static java.lang.CharSequence |
HttpUtil.getCharsetAsSequence(HttpMessage message)
Fetch charset from message's Content-Type header as a char sequence.
|
static java.lang.CharSequence |
HttpUtil.getCharsetAsString(HttpMessage message)
|
static long |
HttpUtil.getContentLength(HttpMessage message)
Returns the length of the content.
|
static long |
HttpHeaders.getContentLength(HttpMessage message)
已过时。
Use
HttpUtil.getContentLength(HttpMessage) instead.
Returns the length of the content. Please note that this value is
not retrieved from ByteBufHolder.content() but from the
"Content-Length" header, and thus they are independent from each
other. |
static int |
HttpUtil.getContentLength(HttpMessage message,
int defaultValue)
Get an
int representation of HttpUtil.getContentLength(HttpMessage, long) . |
static long |
HttpUtil.getContentLength(HttpMessage message,
long defaultValue)
Returns the length of the content or the specified default value if the message does not have the
"Content-Length" header . |
static long |
HttpHeaders.getContentLength(HttpMessage message,
long defaultValue)
已过时。
Use
HttpUtil.getContentLength(HttpMessage, long) instead.
Returns the length of the content. Please note that this value is
not retrieved from ByteBufHolder.content() but from the
"Content-Length" header, and thus they are independent from each
other. |
static java.util.Date |
HttpHeaders.getDate(HttpMessage message)
已过时。
Use
HttpHeaders.getTimeMillis(CharSequence) instead.
Returns the value of the "Date" header. |
static java.util.Date |
HttpHeaders.getDate(HttpMessage message,
java.util.Date defaultValue)
已过时。
Use
HttpHeaders.getTimeMillis(CharSequence, long) instead.
Returns the value of the "Date" header. If there is no such
header or the header is not a formatted date, the defaultValue
is returned. |
static java.util.Date |
HttpHeaders.getDateHeader(HttpMessage message,
java.lang.CharSequence name)
已过时。
Use
HttpHeaders.getTimeMillis(CharSequence) instead.
Returns the date header value with the specified header name. If
there are more than one header value for the specified header name, the
first value is returned. |
static java.util.Date |
HttpHeaders.getDateHeader(HttpMessage message,
java.lang.CharSequence name,
java.util.Date defaultValue)
已过时。
Use
HttpHeaders.getTimeMillis(CharSequence, long) instead.
Returns the date header value with the specified header name. If
there are more than one header value for the specified header name, the
first value is returned. |
static java.util.Date |
HttpHeaders.getDateHeader(HttpMessage message,
java.lang.String name)
已过时。
Use
HttpHeaders.getTimeMillis(CharSequence) instead. |
static java.util.Date |
HttpHeaders.getDateHeader(HttpMessage message,
java.lang.String name,
java.util.Date defaultValue)
已过时。
Use
HttpHeaders.getTimeMillis(CharSequence, long) instead. |
static java.lang.String |
HttpHeaders.getHeader(HttpMessage message,
java.lang.CharSequence name)
已过时。
Use
HttpHeaders.get(CharSequence) instead.
Returns the header value with the specified header name. If there are
more than one header value for the specified header name, the first
value is returned. |
static java.lang.String |
HttpHeaders.getHeader(HttpMessage message,
java.lang.CharSequence name,
java.lang.String defaultValue)
已过时。
Use
HttpHeaders.get(CharSequence, String) instead.
Returns the header value with the specified header name. If there are
more than one header value for the specified header name, the first
value is returned. |
static java.lang.String |
HttpHeaders.getHeader(HttpMessage message,
java.lang.String name)
已过时。
Use
HttpHeaders.get(CharSequence) instead. |
static java.lang.String |
HttpHeaders.getHeader(HttpMessage message,
java.lang.String name,
java.lang.String defaultValue)
已过时。
Use
HttpHeaders.get(CharSequence, String) instead. |
static java.lang.String |
HttpHeaders.getHost(HttpMessage message)
已过时。
Use
HttpHeaders.get(CharSequence) instead.
Returns the value of the "Host" header. |
static java.lang.String |
HttpHeaders.getHost(HttpMessage message,
java.lang.String defaultValue)
已过时。
Use
HttpHeaders.get(CharSequence, String) instead.
Returns the value of the "Host" header. If there is no such
header, the defaultValue is returned. |
static int |
HttpHeaders.getIntHeader(HttpMessage message,
java.lang.CharSequence name)
已过时。
Use
HttpHeaders.getInt(CharSequence) instead.
Returns the integer header value with the specified header name. If
there are more than one header value for the specified header name, the
first value is returned. |
static int |
HttpHeaders.getIntHeader(HttpMessage message,
java.lang.CharSequence name,
int defaultValue)
已过时。
Use
HttpHeaders.getInt(CharSequence, int) instead.
Returns the integer header value with the specified header name. If
there are more than one header value for the specified header name, the
first value is returned. |
static int |
HttpHeaders.getIntHeader(HttpMessage message,
java.lang.String name)
已过时。
Use
HttpHeaders.getInt(CharSequence) instead. |
static int |
HttpHeaders.getIntHeader(HttpMessage message,
java.lang.String name,
int defaultValue)
已过时。
Use
HttpHeaders.getInt(CharSequence, int) instead. |
static java.lang.CharSequence |
HttpUtil.getMimeType(HttpMessage message)
Fetch MIME type part from message's Content-Type header as a char sequence.
|
protected void |
HttpObjectAggregator.handleOversizedMessage(ChannelHandlerContext ctx,
HttpMessage oversized) |
protected void |
HttpObjectDecoder.handleTransferEncodingChunkedWithContentLength(HttpMessage message)
Invoked when a message with both a "Transfer-Encoding: chunked" and a "Content-Length" header field is detected.
|
static boolean |
HttpUtil.is100ContinueExpected(HttpMessage message)
Returns
true if and only if the specified message contains an expect header and the only expectation
present is the 100-continue expectation. |
static boolean |
HttpHeaders.is100ContinueExpected(HttpMessage message)
已过时。
Use
HttpUtil.is100ContinueExpected(HttpMessage) instead.
Returns true if and only if the specified message contains the
"Expect: 100-continue" header. |
protected boolean |
HttpRequestDecoder.isContentAlwaysEmpty(HttpMessage msg) |
protected boolean |
HttpObjectDecoder.isContentAlwaysEmpty(HttpMessage msg) |
protected boolean |
HttpObjectAggregator.isContentLengthInvalid(HttpMessage start,
int maxContentLength) |
static boolean |
HttpUtil.isContentLengthSet(HttpMessage m) |
static boolean |
HttpHeaders.isContentLengthSet(HttpMessage m)
已过时。
Use
HttpUtil.isContentLengthSet(HttpMessage) instead. |
static boolean |
HttpUtil.isKeepAlive(HttpMessage message)
Returns
true if and only if the connection can remain open and
thus 'kept alive'. |
static boolean |
HttpHeaders.isKeepAlive(HttpMessage message)
已过时。
Use
HttpUtil.isKeepAlive(HttpMessage) instead.
Returns true if and only if the connection can remain open and
thus 'kept alive'. This methods respects the value of the
"Connection" header first and then the return value of
HttpVersion.isKeepAliveDefault() . |
static boolean |
HttpUtil.isTransferEncodingChunked(HttpMessage message)
Checks to see if the transfer encoding in a specified
HttpMessage is chunked |
static boolean |
HttpHeaders.isTransferEncodingChunked(HttpMessage message)
已过时。
Use
HttpUtil.isTransferEncodingChunked(HttpMessage) instead.
Checks to see if the transfer encoding in a specified HttpMessage is chunked |
protected java.lang.Object |
HttpObjectAggregator.newContinueResponse(HttpMessage start,
int maxContentLength,
ChannelPipeline pipeline) |
static void |
HttpHeaders.removeHeader(HttpMessage message,
java.lang.CharSequence name)
已过时。
Use
HttpHeaders.remove(CharSequence) instead.
Removes the header with the specified name. |
static void |
HttpHeaders.removeHeader(HttpMessage message,
java.lang.String name)
已过时。
Use
HttpHeaders.remove(CharSequence) instead. |
static void |
HttpHeaders.removeTransferEncodingChunked(HttpMessage m)
已过时。
|
static void |
HttpHeaders.set100ContinueExpected(HttpMessage message)
已过时。
Use
HttpUtil.set100ContinueExpected(HttpMessage, boolean) instead.
Sets the "Expect: 100-continue" header to the specified message.
If there is any existing "Expect" header, they are replaced with
the new one. |
static void |
HttpUtil.set100ContinueExpected(HttpMessage message,
boolean expected)
Sets or removes the
"Expect: 100-continue" header to / from the
specified message. |
static void |
HttpHeaders.set100ContinueExpected(HttpMessage message,
boolean set)
已过时。
Use
HttpUtil.set100ContinueExpected(HttpMessage, boolean) instead.
Sets or removes the "Expect: 100-continue" header to / from the
specified message. If set is true ,
the "Expect: 100-continue" header is set and all other previous
"Expect" headers are removed. Otherwise, all "Expect"
headers are removed completely. |
static void |
HttpUtil.setContentLength(HttpMessage message,
long length)
Sets the
"Content-Length" header. |
static void |
HttpHeaders.setContentLength(HttpMessage message,
long length)
已过时。
Use
HttpUtil.setContentLength(HttpMessage, long) instead. |
static void |
HttpHeaders.setDate(HttpMessage message,
java.util.Date value)
已过时。
Use
HttpHeaders.set(CharSequence, Object) instead.
Sets the "Date" header. |
static void |
HttpHeaders.setDateHeader(HttpMessage message,
java.lang.CharSequence name,
java.util.Date value)
已过时。
Use
HttpHeaders.set(CharSequence, Object) instead.
Sets a new date header with the specified name and value. If there
is an existing header with the same name, the existing header is removed.
The specified value is formatted as defined in
RFC2616 |
static void |
HttpHeaders.setDateHeader(HttpMessage message,
java.lang.CharSequence name,
java.lang.Iterable<java.util.Date> values)
已过时。
Use
HttpHeaders.set(CharSequence, Iterable) instead.
Sets a new date header with the specified name and values. If there
is an existing header with the same name, the existing header is removed.
The specified values are formatted as defined in
RFC2616 |
static void |
HttpHeaders.setDateHeader(HttpMessage message,
java.lang.String name,
java.util.Date value)
已过时。
Use
HttpHeaders.set(CharSequence, Object) instead. |
static void |
HttpHeaders.setDateHeader(HttpMessage message,
java.lang.String name,
java.lang.Iterable<java.util.Date> values)
已过时。
Use
HttpHeaders.set(CharSequence, Iterable) instead. |
static void |
HttpHeaders.setHeader(HttpMessage message,
java.lang.CharSequence name,
java.lang.Iterable<?> values)
已过时。
Use
HttpHeaders.set(CharSequence, Iterable) instead.
Sets a new header with the specified name and values. If there is an
existing header with the same name, the existing header is removed.
This getMethod can be represented approximately as the following code:
removeHeader(message, name); for (Object v: values) { if (v == null) { break; } addHeader(message, name, v); } |
static void |
HttpHeaders.setHeader(HttpMessage message,
java.lang.CharSequence name,
java.lang.Object value)
已过时。
Use
HttpHeaders.set(CharSequence, Object) instead.
Sets a new header with the specified name and value. If there is an
existing header with the same name, the existing header is removed.
If the specified value is not a String , it is converted into a
String by Object.toString() , except for Date
and Calendar which are formatted to the date format defined in
RFC2616. |
static void |
HttpHeaders.setHeader(HttpMessage message,
java.lang.String name,
java.lang.Iterable<?> values)
已过时。
Use
HttpHeaders.set(CharSequence, Iterable) instead. |
static void |
HttpHeaders.setHeader(HttpMessage message,
java.lang.String name,
java.lang.Object value)
已过时。
Use
HttpHeaders.set(CharSequence, Object) instead. |
static void |
HttpHeaders.setHost(HttpMessage message,
java.lang.CharSequence value)
已过时。
Use
HttpHeaders.set(CharSequence, Object) instead.
Sets the "Host" header. |
static void |
HttpHeaders.setHost(HttpMessage message,
java.lang.String value)
已过时。
Use
HttpHeaders.set(CharSequence, Object) instead. |
static void |
HttpHeaders.setIntHeader(HttpMessage message,
java.lang.CharSequence name,
int value)
已过时。
Use
HttpHeaders.setInt(CharSequence, int) instead.
Sets a new integer header with the specified name and value. If there
is an existing header with the same name, the existing header is removed. |
static void |
HttpHeaders.setIntHeader(HttpMessage message,
java.lang.CharSequence name,
java.lang.Iterable<java.lang.Integer> values)
已过时。
Use
HttpHeaders.set(CharSequence, Iterable) instead.
Sets a new integer header with the specified name and values. If there
is an existing header with the same name, the existing header is removed. |
static void |
HttpHeaders.setIntHeader(HttpMessage message,
java.lang.String name,
int value)
已过时。
Use
HttpHeaders.setInt(CharSequence, int) instead. |
static void |
HttpHeaders.setIntHeader(HttpMessage message,
java.lang.String name,
java.lang.Iterable<java.lang.Integer> values)
已过时。
Use
HttpHeaders.set(CharSequence, Iterable) instead. |
static void |
HttpUtil.setKeepAlive(HttpMessage message,
boolean keepAlive)
Sets the value of the
"Connection" header depending on the
protocol version of the specified message. |
static void |
HttpHeaders.setKeepAlive(HttpMessage message,
boolean keepAlive)
已过时。
Use
HttpUtil.setKeepAlive(HttpMessage, boolean) instead.
Sets the value of the "Connection" header depending on the
protocol version of the specified message. This getMethod sets or removes
the "Connection" header depending on what the default keep alive
mode of the message's protocol version is, as specified by
HttpVersion.isKeepAliveDefault() .
|
static void |
HttpHeaders.setTransferEncodingChunked(HttpMessage m)
已过时。
|
static void |
HttpUtil.setTransferEncodingChunked(HttpMessage m,
boolean chunked)
Set the
HttpHeaderNames.TRANSFER_ENCODING to either include HttpHeaderValues.CHUNKED if
chunked is true , or remove HttpHeaderValues.CHUNKED if chunked is false . |
限定符和类型 | 方法和说明 |
---|---|
static Http2Headers |
HttpConversionUtil.toHttp2Headers(HttpMessage in,
boolean validateHeaders)
Converts the given HTTP/1.x headers into HTTP/2 headers.
|
限定符和类型 | 类和说明 |
---|---|
class |
RtspObjectEncoder<H extends HttpMessage>
已过时。
Use
RtspEncoder instead. |
限定符和类型 | 方法和说明 |
---|---|
protected HttpMessage |
RtspDecoder.createInvalidMessage() |
protected HttpMessage |
RtspDecoder.createMessage(java.lang.String[] initialLine) |
限定符和类型 | 方法和说明 |
---|---|
protected void |
RtspEncoder.encodeInitialLine(ByteBuf buf,
HttpMessage message) |
protected boolean |
RtspObjectDecoder.isContentAlwaysEmpty(HttpMessage msg)
已过时。
|
protected boolean |
RtspDecoder.isContentAlwaysEmpty(HttpMessage msg) |
限定符和类型 | 方法和说明 |
---|---|
protected void |
SpdyHttpResponseStreamIdHandler.encode(ChannelHandlerContext ctx,
HttpMessage msg,
java.util.List<java.lang.Object> out) |