|||     for (int i = 0; i < len; i++)
|||             myBytes[i] = (byte) myString.charAt(i);
||| 
||| Do you have a smarter way of doing this?

Well i really hate to say it ... *BUT* had you read the API docs you would
have found:

-------------------------------------------
java.lang.String

public byte[] getBytes()

        Convert this String into bytes according to the 
        platform's default character encoding, storing 
        the result into a new byte array.

Returns:
        the resultant byte array.
Since: 
        JDK1.1 
-------------------------------------------

____________________________________________________
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