Example usage for Java io.netty.handler.codec.http HttpUtil fields, constructors, methods, implement or subclass
The text is from its open source code.
Charset | getCharset(HttpMessage message) Fetch charset from message's Content-Type header. |
Charset | getCharset(CharSequence contentTypeValue) Fetch charset from Content-Type header value. |
Charset | getCharset(HttpMessage message, Charset defaultCharset) Fetch charset from message's Content-Type header. |
Charset | getCharset(CharSequence contentTypeValue, Charset defaultCharset) Fetch charset from Content-Type header value. |
long | 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 . |
int | getContentLength(HttpMessage message, int defaultValue) Get an int representation of #getContentLength(HttpMessage,long) . |
long | getContentLength(HttpMessage message) Returns the length of the content. |
CharSequence | getMimeType(HttpMessage message) Fetch MIME type part from message's Content-Type header as a char sequence. |
CharSequence | getMimeType(CharSequence contentTypeValue) Fetch MIME type part from Content-Type header value as a char sequence. |
boolean | 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. |
boolean | isContentLengthSet(HttpMessage m) |
boolean | isKeepAlive(HttpMessage message) Returns true if and only if the connection can remain open and thus 'kept alive'. |
boolean | isTransferEncodingChunked(HttpMessage message) Checks to see if the transfer encoding in a specified HttpMessage is chunked |
void | set100ContinueExpected(HttpMessage message, boolean expected) Sets or removes the "Expect: 100-continue" header to / from the specified message. |
void | setContentLength(HttpMessage message, long length) Sets the "Content-Length" header. |
void | setKeepAlive(HttpHeaders h, HttpVersion httpVersion, boolean keepAlive) Sets the value of the "Connection" header depending on the protocol version of the specified message. |
void | setKeepAlive(HttpMessage message, boolean keepAlive) Sets the value of the "Connection" header depending on the protocol version of the specified message. |
void | 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 . |