|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jpcap.client.CaptureHistory
Captured packet history.
If a size is specified, the history acts as a FIFO.
Constructor Summary | |
CaptureHistory()
Create a new unbounded capture history buffer. |
|
CaptureHistory(int maxSize)
Create a new bounded capture history buffer. |
Method Summary | |
boolean |
add(Packet packet)
Add the most recent packet to the history collection. |
void |
clear()
Clear all the packets in the history collection. |
int |
dump(boolean colored)
Dump the history buffer contents to stdout. |
Packet |
get(int index)
Fetch a packet from a specific location in the history. |
java.util.Collection |
getCollection()
Fetch the full history as a packet collection. |
int |
getMaxSize()
|
void |
setMaxSize(int maxSize)
Set the size of the history. |
int |
size()
Fetch the number of packets in the history collection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CaptureHistory(int maxSize)
maxSize
- the maximum number of packets to remember.
Oldest packets are discarded first.public CaptureHistory()
Method Detail |
public void setMaxSize(int maxSize)
public int getMaxSize()
public boolean add(Packet packet)
public Packet get(int index)
public java.util.Collection getCollection()
public void clear()
public int size()
public int dump(boolean colored)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |