Package pcap.spi

Interface Dumper

All Superinterfaces:
AutoCloseable

public interface Dumper
extends AutoCloseable
A handle for writing packet to a capture file.
Since:
1.0.0
Author:
Ardika Rommy Sanjaya
  • Method Summary

    Modifier and Type Method Description
    void close()
    Closes a capture file.
    void dump​(PacketHeader header, PacketBuffer buffer)
    Write a packet to a capture file.
    void flush()
    Flushes the output buffer to the capture file.
    long position()
    Capture file position.
  • Method Details

    • dump

      void dump​(PacketHeader header, PacketBuffer buffer)
      Write a packet to a capture file.
      Parameters:
      header - packet header wrapper (PacketHeader).
      buffer - packet buffer wrapper (PacketBuffer).
      Since:
      1.0.0
    • position

      long position()
      Capture file position.
      Returns:
      returns capture file position.
      Since:
      1.0.0
    • flush

      void flush()
      Flushes the output buffer to the capture file.
      Since:
      1.0.0
    • close

      void close()
      Closes a capture file.
      Specified by:
      close in interface AutoCloseable
      Since:
      1.0.0