Validate IP address in Java
It seems fine if there is not any simpler Java or Apache Commons API.

I'd modify a few small things:


The isValid boolean would be unnecesary if you return immediately when you know the return value. (Flattening Arrow Code)
(address == null || address.trim().isEmpty()) could be changed to StringUtils.isBlank.
According to the Code Conventions for the Java Programming Language if statements always should use braces.




public static boolean isValidInetAddress(final String address) {
    if (StringUtils.isBlank(address)) {
        return false;
    }
    if (InetAddressValidator.getInstance().isValid(address)) {
        return true;
    }

    //not an IPV4 address, could be IPV6?
    try {
        return InetAddress.getByName(address) instanceof Inet6Address;
    } catch (final UnknownHostException ex) {
        return false;
    }
}