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;
}

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 .
