Code example for NetworkInterface

Methods: isLoopback

0
     */ 
    @Override 
    protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException {
 
        try { 
            if( networkInterface.isLoopback() ) {
                return getAddress(); 
            } 
        } catch (UnknownHostException e) {
            // One time only log a warning 
            if (!unknownHostLogged) {
                SERVER_LOGGER.cannotResolveAddress(this.address);
                unknownHostLogged = true;
            } 
        } 
        return null; 
    } 
 
    public String toString() {
        StringBuilder sb = new StringBuilder("LoopbackAddressInterfaceCriteria(");
Connect your IDE to all the code out there  Get Codota for Java