Package io.netty.handler.codec.socksx
Enum SocksVersion
- java.lang.Object
-
- java.lang.Enum<SocksVersion>
-
- io.netty.handler.codec.socksx.SocksVersion
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SocksVersion>
public enum SocksVersion extends java.lang.Enum<SocksVersion>
The version of SOCKS protocol.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
byteValue()
Returns the value of the version field, as defined in the protocol specification.static SocksVersion
valueOf(byte b)
Returns theSocksVersion
that corresponds to the specified version field value, as defined in the protocol specification.static SocksVersion
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SocksVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SOCKS4a
public static final SocksVersion SOCKS4a
SOCKS protocol version 4a (or 4)
-
SOCKS5
public static final SocksVersion SOCKS5
SOCKS protocol version 5
-
UNKNOWN
public static final SocksVersion UNKNOWN
Unknown protocol version
-
-
Method Detail
-
values
public static SocksVersion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SocksVersion c : SocksVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SocksVersion valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
valueOf
public static SocksVersion valueOf(byte b)
Returns theSocksVersion
that corresponds to the specified version field value, as defined in the protocol specification.- Returns:
UNKNOWN
if the specified value does not represent a known SOCKS protocol version
-
byteValue
public byte byteValue()
Returns the value of the version field, as defined in the protocol specification.
-
-