|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BlockRecord
A block record also sometimes refered to a file header in a capture file which uniquely identifies the file as certain type with a magic pattern or magic number. Block record contains, as children, one or more data records which usually contain packet data.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface jnetpcap.capture.file.Record |
|---|
Record.Capability, Record.RecordType |
| Method Summary | ||
|---|---|---|
java.nio.ByteOrder |
getByteOrder()
|
|
byte[] |
getMagicPattern()
Returns the Magic number or pattern that is used to uniquely identify the file type of the capture file. |
|
long |
getPacketCount()
Returns the number of packets within the file. |
|
long |
getPacketCount(PacketCounterModel model)
Gets the packet count using a different algorithm. |
|
|
getRecords(java.lang.Class<E> c)
|
|
Version |
getVersion()
Returns the first file version found. |
|
void |
setVersion(int major,
int minor)
|
|
void |
setVersion(Version version)
|
|
| Methods inherited from interface jnetpcap.capture.file.Record |
|---|
getCaptureFile, getFilePosition, getHeaderBuffer, getHeaderLength, getRecordLength, getRecordType, isModified, isWritten, read, readHeader, setFilePosition, setModified, setWritten, validateRecord, write, writeHeader |
| Method Detail |
|---|
java.nio.ByteOrder getByteOrder()
long getPacketCount()
throws java.io.IOException
Returns the number of packets within the file. This only includes
records that hold packet data and not any additional meta data records.
The method uses the default PacketCounter. If estimated packet counter
is acceptable you can use one of of several other PacketCounterModels to
calculate estimated packet count using the
getPacketCount(PacketCounterModel)
method.
The default PacketCounterModel is file type specific. The model at minimum
returns an accurate count of packet records within the capture file, but no
guarrantees about performance can be made and the performance will vary from
format to format. You can use the more explicit getPacketCount(PacketCounterModel)
method to counter packets.
java.io.IOException - any io errors
long getPacketCount(PacketCounterModel model)
throws java.io.IOException
model - model/algorithm to use to count packets
java.io.IOException - any io exceptionsVersion getVersion()
void setVersion(int major,
int minor)
throws java.io.IOException
java.io.IOException
void setVersion(Version version)
throws java.io.IOException
java.io.IOException
<E extends DataRecord> RecordIterator<E> getRecords(java.lang.Class<E> c)
throws java.io.IOException,
CaptureFormatException
java.io.IOException
CaptureFormatException
byte[] getMagicPattern()
throws java.io.IOException
java.io.IOException - any IO errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||