Can anyone explain me why when I constructing BigInteger with 2 byte value toByteArray() then returns 3.
BigInteger data = new BigInteger("FFFF", 16))
data.toByteArray() <-- here am getting 3 bytes.
I think this is because BIgInteger signed by default. Is there any work-around for this?
Also, why BigInteger stores 1 byte value without two's complement additional byte? I am just trying to figure out one elegant way to process all my values.