|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface FilePacket
A file based packet. The interface adds one important method to allow retrieval of packet record position within the capture file.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jnetstream.packet.Packet |
|---|
Packet.Property |
| Method Summary | |
|---|---|
long |
getPositionGlobal()
Gets the global position of this record. |
int |
getPositionLocal()
|
long |
getPositionRegional()
|
| Methods inherited from interface org.jnetstream.capture.CapturePacket |
|---|
getCaptureDevice, getIncludedLength, getOriginalLength |
| Methods inherited from interface org.jnetstream.packet.Packet |
|---|
format, getAllHeaders, getBuffer, getData, getHeader, getHeader, getHeaderCount, getProperty, getTimestampNanos, getTimestampSeconds, hasCompleteHeader, hasCompleteHeader, hasHeader, hasHeader, isTruncated, iterator |
| Method Detail |
|---|
long getPositionGlobal()
throws java.io.IOException
Gets the global position of this record. There are 3 types of position addressing in jNetStream.
The 1st is global position which reflects the address space of the main editor for a file. On an unmodified file, the global position will equal the position of the packet within the physical file. If any edits are in place, the position will differ from the files position and if the packet is based on a buffer completely in memory, such as when a new packet has been added, then the position does not have any mappings to a position related to a file.
The 2nd type is the regional address space which has a 1 to 1 mapping with the physical location within a file. But certain regions of the file may have been mapped out and not all the regions are addressable.
The 3rd type is local address which is the address within the returned buffer. If the buffer is larger then the actual contents of the packet, then the local address specifies offset into the data buffer of the start of packet's data.
java.io.IOException
long getPositionRegional()
throws java.io.IOException
java.io.IOException
int getPositionLocal()
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||