What is the proper implementation of building a string representation of the contents of a byte array?
Advertisements Appending the string builder with the following method is yielding incorrect results. The bytes in the byte array do not match the ‘1’s and ‘0’s represented within the resulting string. InputStream is = new FileInputStream(bout); StringBuilder sb = new StringBuilder(); byte[] a = is.readAllBytes(); for (byte b : a) { for (int i =… Read More What is the proper implementation of building a string representation of the contents of a byte array?