I need to convert some large strings of binary numbers to integers.
I was using Integer.parseInt(myString, 2) which was working fine but now I have strings up to 32 bits long and I get a numberFormatException thrown. I imagine it is because the size of the number exceeds the memory allocated for an integer. I can't use BigInteger because .parseInt will only return an int.
Any ideas how to solve this problem?
I was using Integer.parseInt(myString, 2) which was working fine but now I have strings up to 32 bits long and I get a numberFormatException thrown. I imagine it is because the size of the number exceeds the memory allocated for an integer. I can't use BigInteger because .parseInt will only return an int.
Any ideas how to solve this problem?