Serializable, Comparable<Http.Version>public static enum Http.Version extends Enum<Http.Version>
| Enum Constant | Description |
|---|---|
V1_0 |
HTTP version
HTTP/1.0. |
V1_1 |
HTTP version
HTTP/1.1. |
V2_0 |
HTTP version
HTTP/2.0. |
| Modifier and Type | Method | Description |
|---|---|---|
static Http.Version |
of(String version) |
Returns HTTP version for provided parameter.
|
String |
value() |
Returns
String representation of this Http.Version. |
static Http.Version |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static Http.Version[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Http.Version V1_0
HTTP/1.0.public static final Http.Version V1_1
HTTP/1.1.public static final Http.Version V2_0
HTTP/2.0.public static Http.Version[] values()
for (Http.Version c : Http.Version.values()) System.out.println(c);
public static Http.Version valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String value()
String representation of this Http.Version.public static Http.Version of(String version)
version - HTTP version.NullPointerException - if parameter version is null.IllegalArgumentException - if it is not provided version.Copyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.