code: public static InetAddress decrement(InetAddress address) {
      byte[] addr = address.getAddress();
      int i = addr.length - 1;
      while (i >= 0 && addr[i] == (byte) 0x00) {
        addr[i] = (byte) 0xff;
        i--;
      }
  
      checkArgument(i >= 0, "Decrementing %s would wrap.", address);
  
      addr[i]--;
      return bytesToInetAddress(addr);
    }
docs: Returns a new InetAddress that is one less than the passed in address. This method works for
  both IPv4 and IPv6 addresses.
  
  @param address the InetAddress to decrement
  @return a new InetAddress that is one less than the passed in address
  @throws IllegalArgumentException if InetAddress is at the beginning of its range
  @since 18.0