We are trying to convert from a string to Byte[] using the following Java code:
String source = "0123456789"; byte[] byteArray = source.getBytes("UTF-16");
We get a byte array with a length of 22 bytes, we are not sure where this addition comes from. How to get an array of length 20?
java string encoding bytearray
mayaalpe Oct 23 '08 at 8:45 2008-10-23 08:45
source share