public enum SocksVersion extends java.lang.Enum<SocksVersion>
枚举常量和说明 |
---|
SOCKS4a
SOCKS protocol version 4a (or 4)
|
SOCKS5
SOCKS protocol version 5
|
UNKNOWN
Unknown protocol version
|
限定符和类型 | 方法和说明 |
---|---|
byte |
byteValue()
Returns the value of the version field, as defined in the protocol specification.
|
static SocksVersion |
valueOf(byte b)
Returns the
SocksVersion that corresponds to the specified version field value,
as defined in the protocol specification. |
static SocksVersion |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static SocksVersion[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final SocksVersion SOCKS4a
public static final SocksVersion SOCKS5
public static final SocksVersion UNKNOWN
public static SocksVersion[] values()
for (SocksVersion c : SocksVersion.values()) System.out.println(c);
public static SocksVersion valueOf(java.lang.String name)
name
- 要返回的枚举常量的名称。java.lang.IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException
- 如果参数为空值public static SocksVersion valueOf(byte b)
SocksVersion
that corresponds to the specified version field value,
as defined in the protocol specification.UNKNOWN
if the specified value does not represent a known SOCKS protocol versionpublic byte byteValue()