org.jnetstream.capture.file.nap
Interface NAPBlockRecord

All Superinterfaces:
BlockRecord, Record, com.slytechs.utils.collection.Validatable

public interface NAPBlockRecord
extends BlockRecord

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
static class NAPBlockRecord.Flag
           
 
Nested classes/interfaces inherited from interface org.jnetstream.capture.file.Record
Record.RecordHeaderField
 
Field Summary
static int HDR_BLOCK_ID
           
static int HDR_FLAGS
           
static int HDR_MAGIC_NUMBER
           
static int HDR_MAJOR_VERSION
           
static int HDR_MINOR_VERSION
           
static int HDR_NEXT_BLOCK_ID
           
static int HDR_PACKET_COUNT
           
 
Method Summary
 long getBlockId()
           
 java.util.Set<NAPBlockRecord.Flag> getFlags()
          Mutable set of flags.
 long getNextBlockId()
           
 long getPacketCount()
           
 java.util.Properties getProperties()
          Retrieves the NAP properties record and converts it standard Properties object.
 RecordIterator<? extends DataRecord> getRecordIterator()
           
 com.slytechs.utils.number.Version getVersion()
          Returns the first file version found.
 void setBlockId(long blockId)
           
 void setNextBlockId(long id)
           
 void setPacketCount(int count)
           
 void setVersion(com.slytechs.utils.number.Version version)
           
 boolean validateMagicNumber()
           
 
Methods inherited from interface org.jnetstream.capture.file.BlockRecord
getMagicPattern, order, setMajorVersion
 
Methods inherited from interface org.jnetstream.capture.file.Record
asType, edit, getFileCapture, getPositionGlobal, getRecordBuffer, getRecordHeaderBuffer, getRecordHeaderLength, getRecordLength, getRecordType
 
Methods inherited from interface com.slytechs.utils.collection.Validatable
isValid
 

Field Detail

HDR_MAGIC_NUMBER

static final int HDR_MAGIC_NUMBER
See Also:
Constant Field Values

HDR_MAJOR_VERSION

static final int HDR_MAJOR_VERSION
See Also:
Constant Field Values

HDR_MINOR_VERSION

static final int HDR_MINOR_VERSION
See Also:
Constant Field Values

HDR_FLAGS

static final int HDR_FLAGS
See Also:
Constant Field Values

HDR_BLOCK_ID

static final int HDR_BLOCK_ID
See Also:
Constant Field Values

HDR_NEXT_BLOCK_ID

static final int HDR_NEXT_BLOCK_ID
See Also:
Constant Field Values

HDR_PACKET_COUNT

static final int HDR_PACKET_COUNT
See Also:
Constant Field Values
Method Detail

getBlockId

long getBlockId()

setBlockId

void setBlockId(long blockId)

getNextBlockId

long getNextBlockId()

setNextBlockId

void setNextBlockId(long id)

getVersion

com.slytechs.utils.number.Version getVersion()
Description copied from interface: BlockRecord
Returns the first file version found. There may be multiple blocks within the file at different versions.

Specified by:
getVersion in interface BlockRecord
Returns:
version of the file

setVersion

void setVersion(com.slytechs.utils.number.Version version)

validateMagicNumber

boolean validateMagicNumber()

getFlags

java.util.Set<NAPBlockRecord.Flag> getFlags()
Mutable set of flags. By modifying the flags in this set you enable/disable certain features for the entire block.

Returns:
mutable set of block flags

getPacketCount

long getPacketCount()

setPacketCount

void setPacketCount(int count)

getRecordIterator

RecordIterator<? extends DataRecord> getRecordIterator()
                                                       throws java.io.IOException
Throws:
java.io.IOException

getProperties

java.util.Properties getProperties()
                                   throws java.io.IOException
Retrieves the NAP properties record and converts it standard Properties object.

Returns:
properties that were set/defined within this block
Throws:
java.io.IOException - any IO errors