title: How to convert BitSet to binary string effectively?
body: <p>I am looking for an efficient way how to easily convert a <code>BitSet</code> to a binary string. Let us say that its usual length would be thousands of bits.</p>
  
  <p>For example, lets have this:</p>
  
  <pre><code>BitSet bits = new BitSet(8);
  bits.set(1);
  bits.set(3);
  </code></pre>
  
  <p>And this is the desired result:</p>
  
  <pre><code>String result = toBinaryString(bits);
  // expected: result = "01010000"
  </code></pre>
  
  <p>I have some ideas in general (streams, etc.), but there might be some obvious standard method I am just missing.</p>