Yep;

String t = "hello world";
byte[] b = t.getBytes();


> Guys:
> 
> I need to convert a string into a byte array, and of course I can do the
> following:
> 
> 
>       for (int i = 0; i < len; i++)
>               myBytes[i] = (byte) myString.charAt(i);
> 
> Do you have a smarter way of doing this?


____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Save Bandwidth! Clean up your posts before replying
____________________________________________________

Reply via email to