public boolean isIPAddress(String addr) {
        Pattern p = Pattern.compile(IPV4_PATTERN);
        Matcher m = p.matcher(addr);
        boolean isIP = false;
        if (m.find()) {
            isIP = true;
        }
        return isIP;
    }