public static enum Http.Version extends Enum<Http.Version>
| Enum Constant and 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 and Description |
|---|---|
static Http.Version |
create(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 static Http.Version create(String version)
version - HTTP version.NullPointerException - if parameter version is null.IllegalArgumentException - if it is not provided version.public String value()
String representation of this Http.Version.Copyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.