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.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    SOCKS protocol version 4a (or 4)
    SOCKS protocol version 5
    Unknown protocol version
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final byte
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    SocksVersion(byte b)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    byte
    Returns the value of the version field, as defined in the protocol specification.
    valueOf(byte b)
    Returns the SocksVersion that corresponds to the specified version field value, as defined in the protocol specification.
    valueOf(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static SocksVersion[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • 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
  • Field Details

    • b

      private final byte b
  • Constructor Details

    • SocksVersion

      private SocksVersion(byte b)
  • Method Details

    • values

      public static SocksVersion[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      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 name
      java.lang.NullPointerException - if the argument is null
    • valueOf

      public static SocksVersion valueOf(byte b)
      Returns the SocksVersion 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.