I want to store some data into bytearraysbyte arrays in Java. Basically just numbers which can take up to 2 Bytes per number.
I'd like to know how I can convert an integer into a 2 byte long bytearraybyte array and visevice versa. I found a lot of solutions googelinggoogling but most of them don't explain what happens in the code. There's a lot of shifting stuff I don't really understand so I would appreciate a basic explanation.