org.apache.http
public final class: HttpVersion [javadoc |
source]
java.lang.Object
org.apache.http.ProtocolVersion
org.apache.http.HttpVersion
All Implemented Interfaces:
Serializable, Cloneable
Represents an HTTP version. HTTP uses a "major.minor" numbering
scheme to indicate versions of the protocol.
The version of an HTTP message is indicated by an HTTP-Version field
in the first line of the message.
HTTP-Version = "HTTP" "/" 1*DIGIT "." 1*DIGIT
- version:
$ - Revision: 744522 $ $Date: 2009-02-14 17:56:03 +0100 (Sat, 14 Feb 2009) $
- since:
4.0 -
| Field Summary |
|---|
| public static final String | HTTP | The protocol name. |
| public static final HttpVersion | HTTP_0_9 | HTTP protocol version 0.9 |
| public static final HttpVersion | HTTP_1_0 | HTTP protocol version 1.0 |
| public static final HttpVersion | HTTP_1_1 | HTTP protocol version 1.1 |
| Method from org.apache.http.HttpVersion Summary: |
|---|
|
forVersion |
| Methods from org.apache.http.ProtocolVersion: |
|---|
|
clone, compareToVersion, equals, forVersion, getMajor, getMinor, getProtocol, greaterEquals, hashCode, isComparable, lessEquals, toString |
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from org.apache.http.HttpVersion Detail: |
public ProtocolVersion forVersion(int major,
int minor) {
if ((major == this.major) && (minor == this.minor)) {
return this;
}
if (major == 1) {
if (minor == 0) {
return HTTP_1_0;
}
if (minor == 1) {
return HTTP_1_1;
}
}
if ((major == 0) && (minor == 9)) {
return HTTP_0_9;
}
// argument checking is done in the constructor
return new HttpVersion(major, minor);
}
Obtains a specific HTTP version. |