Enum Class PcapType

java.lang.Object
java.lang.Enum<PcapType>
com.slytechs.jnet.jnetpcap.PcapType
All Implemented Interfaces:
Serializable, Comparable<PcapType>, Constable

public enum PcapType extends Enum<PcapType>
The type of pcap handle that is open by an instance of pcap-pro. Provides several boolean getter methods for positive and negative (opposite) checks on specific pcap types for ease of use in lambda expressions.
Author:
Sly Technologies Inc, repos@slytechs.com
  • Enum Constant Details

    • LIVE_CAPTURE

      public static final PcapType LIVE_CAPTURE
      A live capture from a network device.
    • OFFLINE_READER

      public static final PcapType OFFLINE_READER
      An offline file reader.
    • DEAD_HANDLE

      public static final PcapType DEAD_HANDLE
      A dead handle used for BPF filtering and certain packet processor usage.
  • Method Details

    • values

      public static PcapType[] 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

      public static PcapType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • isDead

      public boolean isDead()
      Checks if is dead handle.
      Returns:
      true, if is dead
    • isLive

      public boolean isLive()
      Checks if is live capture.
      Returns:
      true, if is live
    • isNotDead

      public boolean isNotDead()
      Checks if is not dead handle.
      Returns:
      true, if is not dead
    • isNotLive

      public boolean isNotLive()
      Checks if is not live capture.
      Returns:
      true, if is not live
    • isNotOffline

      public boolean isNotOffline()
      Checks if is not offline reader.
      Returns:
      true, if is not offline
    • isOffline

      public boolean isOffline()
      Checks if is offline reader.
      Returns:
      true, if is offline