com.voytechs.jnetstream.io.meta
Interface CaptureMetaFormat

All Known Implementing Classes:
QueuePacketInputStream, RawformatInputStream

public interface CaptureMetaFormat

Interface that specifies how to retrieve META information from a capture session. No matter what is the underlaying method for getting packet information (stream or file), META information about the source can be retrieve via this interface if data is available.

You can use isMetaDataAvaliable() methods to check if META data is available.

Use getMetaEnumeration() method to retrieve a enumeration of META variables in the order/sequence they were retrieved from the capture stream. Some of this META information may retrieved using some native PacketInputStream methods such as getPacketLength() and getTimestamp(). Retrieving the same variables as META data will return raw, unformatted variables. (i.e. some variables are normalized such as timestamps and record lengths, but not if returned via this interface.)


Method Summary
 java.lang.String getCaptureFormatName()
          Returns the String name of the capture format of the source.
 java.util.Enumeration getMetaEnumeration()
          This method allows new reader to synchronize the order of META variables.
 boolean isMetaDataSupported()
          Return true if META data about the source is supported.
 

Method Detail

isMetaDataSupported

boolean isMetaDataSupported()
Return true if META data about the source is supported.

Returns:
true if META data is available, false if its not.

getMetaEnumeration

java.util.Enumeration getMetaEnumeration()
This method allows new reader to synchronize the order of META variables. Enumerated list of META variables is returned instead of the reader having to query each variable. This is usefull when capture file allows META information to appear in varying order. This enumeration process will return the META information in the order it was processed from the input stream. For most file formats this is irrelevant as most formats have a strict structure for their headers, but there are formats that have a much looser set of requirements.

Sub-class this method and override it with specific implementation. By default empty Enumeration is always returned.

Returns:
Returns the enumerated set of META data, in the order it was processed in the file. If there is no META data present, an empty Enumeration object is returned. This method never returns null.

getCaptureFormatName

java.lang.String getCaptureFormatName()
Returns the String name of the capture format of the source. This is META data in itself.