- All Implemented Interfaces:
Serializable
,Comparable<PcapOption>
,Constable
,IntSupplier
Options usable with
Pcap.init(PcapOption)
call.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionstrings are in the local character encoding.strings are in UTF-8. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
strings are in the local character encoding.static final int
strings are in UTF-8. -
Method Summary
Modifier and TypeMethodDescriptionint
getAsInt()
Pcap option integer value.static Optional
<PcapOption> toEnum
(int option) Converts an integer value into a PCAP option constant, if found.static PcapOption
valueOf
(int option) Converts an integer value into a PCAP option constant.static PcapOption
Returns the enum constant of this class with the specified name.static PcapOption[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
CHAR_ENC_LOCAL
strings are in the local character encoding. -
CHAR_ENC_UTF_8
strings are in UTF-8.
-
-
Field Details
-
PCAP_CHAR_ENC_LOCAL
public static final int PCAP_CHAR_ENC_LOCALstrings are in the local character encoding.- See Also:
-
PCAP_CHAR_ENC_UTF_8
public static final int PCAP_CHAR_ENC_UTF_8strings are in UTF-8.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
valueOf
Converts an integer value into a PCAP option constant.- Parameters:
option
- the PCAP option numerical constant- Returns:
- the PCAP option enum constant
- Throws:
IllegalArgumentException
- thrown if not found
-
toEnum
Converts an integer value into a PCAP option constant, if found.- Parameters:
option
- the PCAP option numerical constant- Returns:
- the PCAP option enum constant
-
getAsInt
public int getAsInt()Pcap option integer value.- Specified by:
getAsInt
in interfaceIntSupplier
- Returns:
- the pcap option as integer
- See Also:
-