question: public static byte [ ] stringToBytesASCII ( String str ) { byte [ ] b = new byte [ str . length ( ) ] ; for ( int i = 0 ; i < b . length ; i ++ ) { b [ i ] = ( byte ) str . charAt ( i ) ; } return b ; }
target:  Convert a string containing only ASCII characters to the equivalent byte array.