Enum SocksVersion

    • 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​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        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.