Convert a byte or int to bitset

Viewed 22314

I have the following:

int num=Integer.parseInt(lineArray[0]);
byte numBit= num & 0xFF;

Is there any very simple way to convert numBit to a bit array? Or even better, is there a way to bypass the byte conversion of the int and go straigh from num to a bit array?

Thanks

5 Answers
Related