Convert boolean[] to String and viceversa in java
<p>Howto convert a boolean array (or BitSet) to a string and vice versa.</p>

<p>Example: </p>

<pre><code>boolean[] ar = {true,false,false,false,false};
print(BitArrayToString(ar));
</code></pre>

<p>Should return one of the following</p>

<pre><code>10000 //binary
16 //decimal
10 //hex, prefered
</code></pre>

<p>The otherway around should work also</p>

<pre><code>ar = StringToBitArray(BitArrayToString(ar));
</code></pre>
