hello everyone,
i would like to know, whether there is a library which I can use to convert a represenation of a long IPv6 adress (such as 2002:9876:57AB:0000:0000:0000:0000:0001) into the compressed IPv6 form (in this case: 2002:9876:57AB::1).
I was not able to find such a library. This library should not use any IP Api, a network connection must not be made.
I already tried
return Inet6Address.getByName(longAdress).toString();
but this just replaces the 4 zeros with 1 zero (in this case 2002:9876:57AB:0:0:0:0:1).
any suggestions?