How can I convert a String containing the destination package of the ipv6 engine package to a 16-byte array? I know about getBytes and encodings, but I cannot figure out which encoding I should use, or I need to convert this String to hexadecimal or not.
String ipv6 = "2001:0DB8:AC10:FE01:0000:0000:0000:0000"; byte[] bytes = ipv6.getBytes();
An example of what I want to do is just to illustrate. Aubert: I need to convert String to 16 byte array Thanks
source share