public enum WebSocketVersion extends java.lang.Enum<WebSocketVersion>
Versions of the web socket specification.
A specification is tied to one wire protocol version but a protocol version may have use by more than 1 version of the specification.
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
toHttpHeaderValue() |
static WebSocketVersion |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static WebSocketVersion[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final WebSocketVersion UNKNOWN
public static final WebSocketVersion V00
public static final WebSocketVersion V07
public static final WebSocketVersion V08
public static final WebSocketVersion V13
public static WebSocketVersion[] values()
for (WebSocketVersion c : WebSocketVersion.values()) System.out.println(c);
public static WebSocketVersion valueOf(java.lang.String name)
name
- 要返回的枚举常量的名称。java.lang.IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量,
则抛出 IllegalArgumentExceptionjava.lang.NullPointerException
- 如果参数为空值, 则抛出 NullPointerExceptionpublic java.lang.String toHttpHeaderValue()