I have a String that I want to decode to a binary object (BigInteger or its String) Say for instance I got the String
String str = "LTEwMTAwMTEwMTExMA==";
An now I want to decode it using the Base64.getDecoder() method, such as:
String result = new BigInteger(Base64.getDecoder().decode(str.getBytes("UTF-8"))).toString(2);
According to that, the value of result is
101101001100010011000000110001001100000011000000110001001100010011000000110001001100010011000100110000
which does not match with the result that I obtain using any online decoder:
-101001101110
Could you please help me? what am I doing wrong? Thank you very much!