java.lang.Object
org.pcap4j.core.PcapDumper
- All Implemented Interfaces:
Closeable,AutoCloseable
- Since:
- pcap4j 0.9.9
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.sun.jna.Pointerprivate final ReentrantReadWriteLockprivate static final org.slf4j.Loggerprivate booleanprivate final PcapHandle.TimestampPrecision -
Constructor Summary
ConstructorsConstructorDescriptionPcapDumper(com.sun.jna.Pointer dumper, PcapHandle.TimestampPrecision timestampPrecision) -
Method Summary
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
dumper
private final com.sun.jna.Pointer dumper -
timestampPrecision
-
dumperLock
-
open
private volatile boolean open
-
-
Constructor Details
-
PcapDumper
PcapDumper(com.sun.jna.Pointer dumper, PcapHandle.TimestampPrecision timestampPrecision)
-
-
Method Details
-
getDumper
com.sun.jna.Pointer getDumper() -
isOpen
public boolean isOpen()- Returns:
- true if this PcapDumper is open; false otherwise.
-
dump
- Parameters:
packet- packet- Throws:
NotOpenException- if this PcapHandle is not open.
-
dump
- Parameters:
packet- packettimestamp- timestamp- Throws:
NotOpenException- if this PcapHandle is not open.
-
dumpRaw
- Parameters:
packet- packet- Throws:
NotOpenException- if this PcapHandle is not open.
-
dumpRaw
- Parameters:
packet- packettimestamp- timestamp- Throws:
NotOpenException- if this PcapHandle is not open.
-
flush
- Throws:
PcapNativeException- if an error occurs in the pcap native library.NotOpenException- if this PcapHandle is not open.
-
ftell
- Returns:
- the file position for a "savefile".
- Throws:
PcapNativeException- if an error occurs in the pcap native library.NotOpenException- if this PcapHandle is not open.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-