Code example for NetworkInterface

Methods: isLoopback

0
     * @return <code>address</code> if {@link NetworkInterface#isLoopback()} is true, null otherwise. 
     */ 
    @Override 
    protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException {
 
        if( networkInterface.isLoopback() )
            return address;
        return null; 
    } 
 
    private Object readResolve() throws ObjectStreamException {
        return INSTANCE;
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java