public static String rawStringFromBytes ( byte [ ] data ) { StringBuilder str = new StringBuilder ( data . length ) ; for ( byte b : data ) { str . append ( ( char ) ( b & 0xff ) ) ; } return str . toString ( ) ; }
Construct a String from the given bytes where these are directly converted to the corresponding chars without using a given character encoding