Converting text to binary in java
<p>I want to convert every character of a String to a new binary String. Here is what I do :</p>

<pre><code>public static void main(String args[]) {
    String MESSAGE = "%";
    String binaryResult = "";
    for (char c : MESSAGE.toCharArray()){
        binaryResult += Integer.toBinaryString( (int) c);
    }
    System.err.println(binaryResult);
}
</code></pre>

<p>For exemple with the input : "%", I get the following output : "100101"
My problem is that the leading "0" is deleted ... 
I want to have : "0100101". Does anyone have ideas?</p>