org.jnetstream.capture
Enum FormatType

java.lang.Object
  extended by java.lang.Enum<FormatType>
      extended by org.jnetstream.capture.FormatType
All Implemented Interfaces:
com.slytechs.utils.namespace.Named, java.io.Serializable, java.lang.Comparable<FormatType>

public enum FormatType
extends java.lang.Enum<FormatType>
implements com.slytechs.utils.namespace.Named

Some standard supplied file types with some convenience methods. The enum structure implements the required CaptureType which all factory methods require and you can use these constants directly to specify the file type.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
static interface FormatType.Detail
          Detailed information about a specific format.
 
Nested classes/interfaces inherited from interface com.slytechs.utils.namespace.Named
com.slytechs.utils.namespace.Named.Util
 
Enum Constant Summary
Nap
          jNetStream's own Network cAPture file format
Other
          Format type that does not have a "hard" implementation distributed part of the core "capture framework" distribution.
Pcap
          TcpDump.org Pcap file type
Snoop
          Snoop file format
 
Method Summary
 java.lang.String[] getCommonExtensions()
          Retrieves common extensions for this file format.
 java.lang.String getDetailedName()
           
 java.lang.String getName()
          Gets the string name of the file type.
 java.lang.Class<? extends FileCapture<? extends FilePacket>> getTypeClass()
          Gets the main class that provides all the functionality for this type of file
static FormatType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FormatType[] 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

Pcap

public static final FormatType Pcap
TcpDump.org Pcap file type


Nap

public static final FormatType Nap
jNetStream's own Network cAPture file format


Snoop

public static final FormatType Snoop
Snoop file format


Other

public static final FormatType Other
Format type that does not have a "hard" implementation distributed part of the core "capture framework" distribution. This is typically NPL based file format that has an NPL based definition. These types of formats are only supported by CaptureInput sessions.

Method Detail

values

public static final FormatType[] 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(FormatType c : FormatType.values())
        System.out.println(c);

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

valueOf

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

getTypeClass

public java.lang.Class<? extends FileCapture<? extends FilePacket>> getTypeClass()
Gets the main class that provides all the functionality for this type of file

Returns:
main implementing class
See Also:
org.jnetstream.capture.CaptureType#getTypeClass()

getName

public java.lang.String getName()
Gets the string name of the file type.

Specified by:
getName in interface com.slytechs.utils.namespace.Named
Returns:
name of this file type
See Also:
Named.getName()

getCommonExtensions

public java.lang.String[] getCommonExtensions()
Retrieves common extensions for this file format.

Returns:
array of common extensions for this file format, including the preceding typical "dot"

getDetailedName

public java.lang.String getDetailedName()
Returns: