In Java, I can't take a byte array of unsigned bytes (from something such as Wire Shark) and put this into java.... Because I will get compile errors since anything greater than 127 decimal/0x07F is treated not as a byte, but as an int.... IE:
byte[] protocol = { 0x04, 0x01, 0x00, 0x50, /*error*/0xc1, /*error*/0xdb, 0x1c, /*error*/0x8c,
0x4d, 0x4f, 0x5a, 0x00 };
Need a good way to handle taking unsigned char arrays and putting them into Java as literals.
Cast them to (byte).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With