question: public static byte [ ] stringToByteArray ( String input ) { char chars [ ] = input . toCharArray ( ) ; byte bytes [ ] = new byte [ chars . length ] ; for ( int i = 0 ; i < chars . length ; i ++ ) { bytes [ i ] = ( byte ) chars [ i ] ; } return bytes ; }
target:  Converts a string to a byte array.