Code example for NetworkInterface

Methods: isUp

0
     *         {@link NetworkInterface#isUp() up} 
     */ 
    @Override 
    public InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException {
 
        if( networkInterface.isUp() )
            return address;
        return null; 
    } 
 
    private Object readResolve() throws ObjectStreamException {
        return INSTANCE;
    } 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java