jpcap
Class JpcapWriter

java.lang.Object
  |
  +--jpcap.JpcapWriter

public class JpcapWriter
extends java.lang.Object

This class is used to save the captured packets into a file.


Constructor Summary
JpcapWriter(Jpcap jpcap, java.lang.String filename)
          Opens a file to save the captured packets.
 
Method Summary
 void closeDumpFile()
          Closes the opened file.
 void writeDumpFile(Packet packet)
          Saves a packet into the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JpcapWriter

public JpcapWriter(Jpcap jpcap,
                   java.lang.String filename)
            throws java.io.IOException
Opens a file to save the captured packets.

Parameters:
jpcap - instance of Jpcap that was used to capture (load) packets
filename - filename
Throws:
IOException - If the file cannot be opened
Method Detail

closeDumpFile

public void closeDumpFile()
Closes the opened file.


writeDumpFile

public void writeDumpFile(Packet packet)
Saves a packet into the file.

Parameters:
packet - Packet to be saved