- java.lang.Object
-
- org.pcap4j.util.NifSelector
-
public class NifSelector extends java.lang.Object- Since:
- pcap4j 0.9.1
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringLINE_SEPARATOR
-
Constructor Summary
Constructors Constructor Description NifSelector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PcapNetworkInterfacedoSelect(java.util.List<PcapNetworkInterface> nifs)protected java.lang.Stringread()PcapNetworkInterfaceselectNetworkInterface()protected voidshowNifList(java.util.List<PcapNetworkInterface> nifs)protected voidwrite(java.lang.String msg)
-
-
-
Method Detail
-
selectNetworkInterface
public final PcapNetworkInterface selectNetworkInterface() throws java.io.IOException
- Returns:
- a PcapNetworkInterface object which represents a selected network interface.
- Throws:
java.io.IOException- if no network interface is available.
-
write
protected void write(java.lang.String msg) throws java.io.IOException- Parameters:
msg- msg- Throws:
java.io.IOException- if fails to write.
-
read
protected java.lang.String read() throws java.io.IOException- Returns:
- string
- Throws:
java.io.IOException- if fails to read.
-
showNifList
protected void showNifList(java.util.List<PcapNetworkInterface> nifs) throws java.io.IOException
- Parameters:
nifs- nifs- Throws:
java.io.IOException- if fails to show.
-
doSelect
protected PcapNetworkInterface doSelect(java.util.List<PcapNetworkInterface> nifs) throws java.io.IOException
- Parameters:
nifs- nifs- Returns:
- a PcapNetworkInterface object which represents a selected network interface.
- Throws:
java.io.IOException- if fails in something around IO.
-
-