Yes, you can easily do this using Integer.parseInt(String s, int radix)
.
In your case, radix 2
, so you just need to split the whole binary string into 8 character substrings and use Integer.parseInt(substring, 2)
. Then you convert them to symbols and concatenate them.
source
to share