Android Utililty Methods IP Address Check

List of utility methods to do IP Address Check

Description

The list of methods to do IP Address Check are organized into topic(s).

Method

booleanisIp4Address(String text)
is Ip Address
if (TextUtils.isEmpty(text)) {
    return false;
Pattern pattern = Pattern.compile(regIpAddress);
Matcher macher = pattern.matcher(text);
return macher.matches();
booleanisSipAddress(String numberOrAddress)
is Sip Address
Pattern p = Pattern.compile(sipAddressRegExp);
Matcher m = p.matcher(numberOrAddress);
return m != null && m.matches();
booleanisStrictSipAddress(String numberOrAddress)
is Strict Sip Address
Pattern p = Pattern.compile(strictSipAddressRegExp);
Matcher m = p.matcher(numberOrAddress);
return m != null && m.matches();