add isLoopback method

This commit is contained in:
Doug MacEachern 2006-03-02 01:29:13 +00:00
parent 848dcc5093
commit 8993abbd98
1 changed files with 7 additions and 0 deletions

View File

@ -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);
}
} }