question: public static String toChar ( byte b ) { if ( b >= 0x20 ) { return Character . toString ( ( char ) b ) ; } else { return String . format ( "%02x" , b ) ; } }
target:  Convert a byte to a character for printing. If the byte value is &lt; 32 -and hence unprintable- the byte is returned as a two digit hex value