question: private static final String toHexString ( final byte [ ] bs ) { String hex = "0123456789ABCDEF" ; StringBuilder res = new StringBuilder ( ) ; for ( byte b : bs ) { res . append ( hex . charAt ( ( ( b > > > 4 ) & 0xF ) ) ) ; res . append ( hex . charAt ( ( b & 0xF ) ) ) ; } return res . toString ( ) ; }
target:  Convert and array of bytes to a Hex string.