public static Inet6Address convertToIpv6(InetAddress value) {
        if (value == null || value instanceof Inet6Address) {
            return (Inet6Address) value;
        }

        // https://en.wikipedia.org/wiki/IPv6#IPv4-mapped_IPv6_addresses
        byte[] bytes = new byte[16];
        bytes[10] = (byte) 0xFF;
        bytes[11] = (byte) 0xFF;
        System.arraycopy(value.getAddress(), 0, bytes, 12, 4);

        try {
            return Inet6Address.getByAddress(null, bytes, null);
        } catch (UnknownHostException e) {
            throw new IllegalArgumentException(e);
        }
    }
Converts IPv4 address to IPv6 address.

@param value IPv4 address
@return IPv6 address
@throws IllegalArgumentException when failed to convert to IPv6 address
client-v2/src/main/java/com/clickhouse/client/api/data_formats/internal/InetAddressConverter.java