Here you can find the source of byteArrayToString(byte[] data)
Parameter | Description |
---|---|
data | complete data array [header+body] |
static String byteArrayToString(byte[] data)
//package com.java2s; public class Main { /**/*ww w. java 2 s . c o m*/ * Returns a (readable) String representation of the byte array * * @param data * complete data array [header+body] * @return bytes as a String */ static String byteArrayToString(byte[] data) { StringBuilder sb = new StringBuilder(); for (byte b : data) { sb.append(Integer.toString(b)); } return sb.toString(); } }