org.jnetstream.capture.file
Enum PacketCounterModel

java.lang.Object
  extended by java.lang.Enum<PacketCounterModel>
      extended by org.jnetstream.capture.file.PacketCounterModel
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PacketCounterModel>

public enum PacketCounterModel
extends java.lang.Enum<PacketCounterModel>

Defines different types of models, or algorithms that can be used to count packets in a capture file.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Enum Constant Summary
RealCount
          Does an accurate packet count even if it means that the entire file has be be traversed.
StatisticalCount
          Takes samples of certain sections through out the file and estimates the number of packets.
 
Method Summary
static PacketCounterModel valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PacketCounterModel[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

RealCount

public static final PacketCounterModel RealCount
Does an accurate packet count even if it means that the entire file has be be traversed. Packet count is guarranteed to be accurate


StatisticalCount

public static final PacketCounterModel StatisticalCount
Takes samples of certain sections through out the file and estimates the number of packets. The statistical approach is not 100% accurate, but the count returned is typically very close to the actual number. This type of model is much more efficient, especially on large files, and can return a count very quickly.

Method Detail

values

public static final PacketCounterModel[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(PacketCounterModel c : PacketCounterModel.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static PacketCounterModel 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