question: public static byte [ ] hexStringToByte ( final String source ) { byte [ ] bytes = null ; if ( source != null ) { bytes = new byte [ source . length ( ) / 2 ] ; int i = 0 ; while ( i < bytes . length ) { bytes [ i ] = ( byte ) ( Integer . parseInt ( source . substring ( i * 2 , ( i + 1 ) * 2 ) , 16 ) ) ; i ++ ; } } return bytes ; }
target:  hex string to byte