Class NifSelector


  • public class NifSelector
    extends java.lang.Object
    Since:
    pcap4j 0.9.1
    Author:
    Kaito Yamada
    • Constructor Detail

      • NifSelector

        public NifSelector()
    • 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.