I don't know if this is a bug or there is something i'm missing here.I'm trying to get the exact bytes of a file so i can work on some.
So i have a byte[1024] array to get the first 1024 bytes of it,a char[1024] array,and i am doing an Integer.toBinaryString on each byte to see it's value
But in some positions,instead of an 8 bit byte,there are values like index[20]=11111111111111111111111111111111 index[21]=11111111111111111111111111111110
How can a byte be 32 bits?
In this case it's supposed to be a UTF-16 BOM and according to my test it should be 255 254 ,so only the last 8 of each index should be there
Thank you in advance for the help