public static byte[] string2Byte(String hexString) {    
        char[] chars = hexString.toCharArray();
        int len = chars.length >> 1;
        byte[] bytes = new byte[len];
        for(int i = 0; i != len; i++) {
            int position = i << 1;
            int high = 0;
            int low = 0;
            
            if(chars[position]<'A') {
                high = chars[position]-0x30;
            } else {
                high = chars[position]-0x37;
            }
            if(chars[position+1]<'A') {
                low = chars[position+1]-0x30;
            } else {
                low = chars[position+1]-0x37;
            }
            high = high << 4;
            
            bytes[i] = (byte) (high + low);
        }
        
        return bytes;
    }