I am currently trying to convert integers into a binary string. However, I need each binary "group" to be exactly 8 bits or 1 byte.
For example, Integer.toBinaryString(17)
will give me "10001" where instead I need "00010001"
Is there some method I can use, or possibly a simpler solution outside of hard-coding the outputs?