code: public static Inet4Address forIPv4String(String ipString) {
          requireNonNull(ipString);
  
          try{
              InetAddress parsed = forString(ipString);
  
              if (parsed instanceof Inet4Address)
                  return (Inet4Address) parsed;
  
          } catch(Exception ignored){}
  
          throw new IllegalArgumentException(format("Invalid IPv4 representation: %s", ipString));
      }
docs: Generates a new Inet4Address instance from the provided address. This will NOT do a dns lookup on the address if it
  does not represent a valid ip address like {@code InetAddress.getByName()}.