I have a byte array that consists of ASCII characters that I wish to convert to a String. For example:
byte[] myByteArray = new byte[8];
for (int i=0; i<8; i++) {
byte[i] = (byte) ('0' + i);
}
myByteArray should contain a string "12345678" after the loop. How do I get this string into a String variable?
Thanks!
See Question&Answers more detail:os