public static byte [ ] toAsciiByteArray ( CharSequence charSequence ) { byte [ ] barr = new byte [ charSequence . length ( ) ] ; for ( int i = 0 ; i < barr . length ; i ++ ) { char c = charSequence . charAt ( i ) ; barr [ i ] = ( byte ) ( ( int ) ( c <= 0xFF ? c : 0x3F ) ) ; } return barr ; }
Converts char sequence into ASCII byte array .