public class NetworkUtils extends Object
| Constructor and Description |
|---|
NetworkUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkIPMatching(String pattern,
String address)
check if IP address match pattern
|
public static boolean checkIPMatching(String pattern, String address)
pattern - *.*.*.* , 192.168.1.0-255 , *address - - 192.168.1.1address = 10.2.88.12 pattern = *.*.*.* result: true
address = 10.2.88.12 pattern = * result: true
address = 10.2.88.12 pattern = 10.2.88.12-13 result: true
address = 10.2.88.12 pattern = 10.2.88.13-125 result: false
Copyright © 2014–2015. All rights reserved.