Represents an HTTP version, as specified in RFC 2616. More...
The following notice applies to the original API on which this API is based, and to its documentation. The documentation of this API has been revised from the original.
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
Public Member Functions | |
HttpVersion (int major, int minor) | |
Create an HTTP protocol version designator. More... | |
ProtocolVersion | forVersion (int major, int minor) |
Obtains a specific HTTP version. More... | |
Public Member Functions inherited from ProtocolVersion | |
ProtocolVersion (String protocol, int major, int minor) | |
Create a protocol version designator. More... | |
final String | getProtocol () |
Returns the name of the protocol. More... | |
final int | getMajor () |
Returns the major version number of the protocol. More... | |
final int | getMinor () |
Returns the minor version number of the HTTP protocol. More... | |
final int | hashCode () |
Obtains a hash code consistent with equals. More... | |
final boolean | equals (Object obj) |
Checks equality of this protocol version with an object. More... | |
boolean | isComparable (ProtocolVersion that) |
Checks whether this protocol can be compared to another one. More... | |
int | compareToVersion (ProtocolVersion that) |
Compares this protocol version with another one. More... | |
final boolean | greaterEquals (ProtocolVersion version) |
Tests if this protocol version is greater or equal to the given one. More... | |
final boolean | lessEquals (ProtocolVersion version) |
Tests if this protocol version is less or equal to the given one. More... | |
String | toString () |
Converts this protocol version to a string. More... | |
Static Public Attributes | |
static final String | HTTP = "HTTP" |
The protocol name. More... | |
static final HttpVersion | HTTP_0_9 = new HttpVersion(0, 9) |
HTTP protocol version 0.9. | |
static final HttpVersion | HTTP_1_0 = new HttpVersion(1, 0) |
HTTP protocol version 1.0. | |
static final HttpVersion | HTTP_1_1 = new HttpVersion(1, 1) |
HTTP protocol version 1.1. | |
Additional Inherited Members | |
Protected Attributes inherited from ProtocolVersion | |
final String | protocol |
Name of the protocol. More... | |
final int | major |
Major version number of the protocol. | |
final int | minor |
Minor version number of the protocol. | |
HttpVersion | ( | int | major, |
int | minor | ||
) |
major | the major version number of the HTTP protocol |
minor | the minor version number of the HTTP protocol |
IllegalArgumentException | if either major or minor version number is negative |
ProtocolVersion forVersion | ( | int | major, |
int | minor | ||
) |
major | the major version |
minor | the minor version |
Reimplemented from ProtocolVersion.
|
static |