private void initializeLocalhostNI ( ) { InetAddress localhost ; try { localhost = InetAddress . getLocalHost ( ) ; NetworkInterface ni = NetworkInterface . getByInetAddress ( localhost ) ; if ( ni != null ) getNIList ( ) . add ( ni . getName ( ) ) ; } catch ( UnknownHostException | SocketException e ) { Console . severe ( "Cannot get the Network Interface for localhost" ) ; Console . severe ( e . getMessage ( ) ) ; } }
Sets up the network interface list with at least the localhost NI .