Saturday, April 28, 2012

How to convert a String into a byte array


Sounds simple and it is simple! But, what if you don’t know how to do this?! Don’t spend your valuable time with small things, just use this:

        String helloString = “HELLO”;
        byte[] helloBytes =helloString.getBytes();

No comments:

Post a Comment