Class PcapDumper

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public final class PcapDumper
    extends java.lang.Object
    implements java.io.Closeable
    Since:
    pcap4j 0.9.9
    • Field Detail

      • logger

        private static final org.slf4j.Logger logger
      • dumper

        private final com.sun.jna.Pointer dumper
      • dumperLock

        private final java.util.concurrent.locks.ReentrantReadWriteLock dumperLock
      • open

        private volatile boolean open
    • Method Detail

      • getDumper

        com.sun.jna.Pointer getDumper()
      • isOpen

        public boolean isOpen()
        Returns:
        true if this PcapDumper is open; false otherwise.
      • dump

        public void dump​(Packet packet,
                         java.sql.Timestamp timestamp)
                  throws NotOpenException
        Parameters:
        packet - packet
        timestamp - timestamp
        Throws:
        NotOpenException - if this PcapHandle is not open.
      • dumpRaw

        public void dumpRaw​(byte[] packet)
                     throws NotOpenException
        Parameters:
        packet - packet
        Throws:
        NotOpenException - if this PcapHandle is not open.
      • dumpRaw

        public void dumpRaw​(byte[] packet,
                            java.sql.Timestamp timestamp)
                     throws NotOpenException
        Parameters:
        packet - packet
        timestamp - timestamp
        Throws:
        NotOpenException - if this PcapHandle is not open.
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable