public static void writeHexBytes ( byte [ ] o , int from , byte [ ] b ) { int len = b . length ; for ( int i = 0 ; i < len ; i ++ ) { int c = ( ( int ) b [ i ] ) & 0xff ; o [ from ++ ] = HEXBYTES [ c >> 4 & 0xf ] ; o [ from ++ ] = HEXBYTES [ c & 0xf ] ; } }
Converts a byte array into hexadecimal characters which are written as ASCII to the given output stream .