So I have this byte array:
// tvltmp[0] = 0x21;
// tvltmp[1] = 0x63;
// tvltmp[2] = 0x84;
And this represents "12:36:48"
in what I called "reversed endianess BDC".
To decode that, one just have to follow this manual:
LSD | MSD
byte0 2|1 Hour
byte1 6|3 Minute
byte2 8|4 Second
LSD = Least Significant Digit
MSD = Most Significant Digit
Which is fair enough.
I just have no clue how to get that done in Java.
Basically, how do I invert the endianess of a byte array (assuming that this is indeed a endianess issue)?
And how do I get the proper values from BCD bytes in java? I mean if I do the typical & 0xFF
things will obviously go wrong...
Thanks,