add isLoopback method
This commit is contained in:
parent
848dcc5093
commit
8993abbd98
|
@ -176,4 +176,11 @@ public class NetFlags {
|
||||||
address.equals(ANY_ADDR) ||
|
address.equals(ANY_ADDR) ||
|
||||||
address.equals(ANY_ADDR_V6);
|
address.equals(ANY_ADDR_V6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isLoopback(String address) {
|
||||||
|
return
|
||||||
|
address.equals(LOOPBACK_HOSTNAME) ||
|
||||||
|
address.equals(LOOPBACK_ADDRESS) ||
|
||||||
|
address.equals(LOOPBACK_ADDRESS_V6);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue