String to byte conversion
<p>How can I convert a string to byte? For example, <code>Byte.parseByte("255");</code> causes <code>NumberFormatException</code> since (for some weird reason) <code>byte</code> is <code>signed</code> in java so the maximum value it can have is <code>127</code>.</p>

<p>So I need a function such that </p>

<pre><code>public static byte toByte(String input) {
...
}
</code></pre>

<p>And for example <code>toByte("255");</code> should return <code>-1</code>(ie bits: 11111111)</p>

<p>Something like implementation of <a href="http://en.wikipedia.org/wiki/Two%27s_complement" rel="nofollow">2s complement</a></p>
