public static byte [ ] hexStringToBytes ( String data ) { if ( data == null ) return EMPTY_BYTE_ARRAY ; if ( data . startsWith ( "0x" ) ) data = data . substring ( 2 ) ; return Hex . decode ( data ) ; }
Converts string hex representation to data bytes