Package org.pcap4j.util
Class NifSelector
- java.lang.Object
-
- org.pcap4j.util.NifSelector
-
public class NifSelector extends java.lang.Object
- Since:
- pcap4j 0.9.1
- Author:
- Kaito Yamada
-
-
Constructor Summary
Constructors Constructor Description NifSelector()
-
Method Summary
Modifier and Type Method Description protected PcapNetworkInterface
doSelect(java.util.List<PcapNetworkInterface> nifs)
protected java.lang.String
read()
PcapNetworkInterface
selectNetworkInterface()
protected void
showNifList(java.util.List<PcapNetworkInterface> nifs)
protected void
write(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.
-
-