public static enum Http.Version extends java.lang.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(java.lang.String version) |
Returns HTTP version for provided parameter.
|
java.lang.String |
value() |
Returns
String representation of this Http.Version. |
static Http.Version |
valueOf(java.lang.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(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static Http.Version of(java.lang.String version)
version - HTTP version.java.lang.NullPointerException - if parameter version is null.java.lang.IllegalArgumentException - if it is not provided version.public java.lang.String value()
String representation of this Http.Version.Copyright © 2018 Oracle Corporation. All rights reserved.