Convert a long into 8 bytes
Hi everybody
An easy question. I have a long (64 bits) and I want to convert it into 8 bytes (8 * 8 bits). Is there any easy way in order to do this? How can I do it?
I have tried converting the long into a String of 64 bits with the "Long.toBinaryString" function and then using "Byte.pardeByte" to obtain the bytes. However, I get an error when trying to convert the String "11111111" into a byte. Any ideas?
Thanks in advance!

