com.voytechs.jnetstream.io.meta
Class MetaValue

java.lang.Object
  extended by com.voytechs.jnetstream.io.meta.MetaValue

public class MetaValue
extends java.lang.Object

META value. META values are capture files header values, such as number of packets in the capture file, various extra information normally not seen when working with PacketInputStream. These extra values that make up the capture file can be extracted using Meta API which this object is appart of.

See Also:
com.voytechs.jnetstream.PacketInputStream

Constructor Summary
MetaValue(Field metaValue)
          Will use Field as the source of the value to be returned.
 
Method Summary
 Field fieldValue()
          Converts the MetaValue to Field, suitable for writting out OutputStream.
 int getSize()
          Returns the size of the META value in bits.
static void main(java.lang.String[] args)
          Test function for MetaValue
 Primitive primitiveValue()
          The value returned as a primitive.
 java.lang.String toString()
          Returns String representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaValue

public MetaValue(Field metaValue)
Will use Field as the source of the value to be returned.

Parameters:
Field - to extract Meta value from.
Throws:
java.lang.IllegalArgumentException - If meta value is 'null'
Method Detail

getSize

public int getSize()
Returns the size of the META value in bits.

Returns:
The length or size of the META value in bits.

primitiveValue

public Primitive primitiveValue()
The value returned as a primitive.


fieldValue

public Field fieldValue()
Converts the MetaValue to Field, suitable for writting out OutputStream.

This is extremely efficient.

Returns:
Meta value as a Field object.

toString

public java.lang.String toString()
Returns String representation

Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)
Test function for MetaValue

Parameters:
args - command line arguments