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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…