| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| public static final HttpVersion | HTTP_1_0
HTTP/1.0 |
| pack-priv static final String | |
| public static final HttpVersion | HTTP_1_1
HTTP/1.1 |
| pack-priv static final String | |
| private final boolean | |
| private final int | |
| private final int | |
| private final String | |
| private final String | |
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| public | HttpVersion(String text, boolean
true if and only if the connection is kept alive unless
the "Connection" header is set to "close" explicitly.Creates a new HTTP version with the specified version string. |
| public | HttpVersion(String protocolName, int majorVersion, int minorVersion, boolean
true if and only if the connection is kept alive unless
the "Connection" header is set to "close" explicitly.Creates a new HTTP version with the specified protocol name and version numbers. |
| private | HttpVersion(String protocolName, int majorVersion, int minorVersion, boolean keepAliveDefault, boolean bytes)
|
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(HttpVersion
the object to be compared. o)Implements java. |
| pack-priv void | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public int | |
| public boolean | isKeepAliveDefault()
Returns |
| public int | |
| public int | |
| public String | |
| public String | |
| public String | toString()
Overrides java. "HTTP/1.0".
|
| public static HttpVersion | valueOf(String text)
Returns an existing or new |
| private static HttpVersion |
| bytes | back to summary |
|---|---|
| private final byte[] bytes | |
| HTTP_1_0 | back to summary |
|---|---|
| public static final HttpVersion HTTP_1_0 HTTP/1.0 | |
| HTTP_1_0_STRING | back to summary |
|---|---|
| pack-priv static final String HTTP_1_0_STRING | |
| HTTP_1_1 | back to summary |
|---|---|
| public static final HttpVersion HTTP_1_1 HTTP/1.1 | |
| HTTP_1_1_STRING | back to summary |
|---|---|
| pack-priv static final String HTTP_1_1_STRING | |
| keepAliveDefault | back to summary |
|---|---|
| private final boolean keepAliveDefault | |
| majorVersion | back to summary |
|---|---|
| private final int majorVersion | |
| minorVersion | back to summary |
|---|---|
| private final int minorVersion | |
| protocolName | back to summary |
|---|---|
| private final String protocolName | |
| text | back to summary |
|---|---|
| private final String text | |
| VERSION_PATTERN | back to summary |
|---|---|
| private static final Pattern VERSION_PATTERN | |
| HttpVersion | back to summary |
|---|---|
| public HttpVersion(String text, boolean keepAliveDefault) Creates a new HTTP version with the specified version string. You will not need to create a new instance unless you are implementing a protocol derived from HTTP, such as RTSP and ICAP.
| |
| HttpVersion | back to summary |
|---|---|
| public HttpVersion(String protocolName, int majorVersion, int minorVersion, boolean keepAliveDefault) Creates a new HTTP version with the specified protocol name and version numbers. You will not need to create a new instance unless you are implementing a protocol derived from HTTP, such as RTSP and ICAP
| |
| HttpVersion | back to summary |
|---|---|
| private HttpVersion(String protocolName, int majorVersion, int minorVersion, boolean keepAliveDefault, boolean bytes) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(HttpVersion o) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| encode | back to summary |
|---|---|
| pack-priv void encode(ByteBuf buf) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isKeepAliveDefault | back to summary |
|---|---|
| public boolean isKeepAliveDefault() Returns | |
| majorVersion | back to summary |
|---|---|
| public int majorVersion() Returns the name of the protocol such as | |
| minorVersion | back to summary |
|---|---|
| public int minorVersion() Returns the name of the protocol such as | |
| protocolName | back to summary |
|---|---|
| public String protocolName() Returns the name of the protocol such as | |
| text | back to summary |
|---|---|
| public String text() Returns the full protocol version text such as | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns the full protocol version text such as
| |
| valueOf | back to summary |
|---|---|
| public static HttpVersion valueOf(String text) Returns an existing or new | |
| version0 | back to summary |
|---|---|
| private static HttpVersion version0(String text) | |