What does the string contain. Is it integer or binary value or anything else?
Check the Java API to convert string to integer and then to binary value.
The string can contain anything from characters to integer values and also special characters +, =, space etc.
I can convert it into binary string i.e. a string of 0s and 1s.