Can anyone help me understand this method used to generate a Huffman tree?
<p>I'm trying to understanding this code, which is about generating a <a href="http://en.wikipedia.org/wiki/Huffman_coding" rel="nofollow">Huffman tree</a>.  What is the use of this method in this code? Please explain it clearly. Thanks</p>

<pre><code>public static Byte toByte(String str) {
    int io = 0;
    for (int i = 0; i &lt; str.length(); i++) {
        io += Math.pow(2, i) * Byte.parseByte(str.charAt(str.length() - i - 1) + "");
    }
    return (byte) io;
}
</code></pre>
