This a legacy system so please don't tell me what I'm trying to do is wrong. It has to be this way.
I have a byte array where date is put in a sequential manner. This is fine until I want to store a value above 255. To do this I need to use 2 bytes as a 16 bit value.
So I need to convert an int into two chars and then the two chars back into an int.
One program is in C and the other in Java and they communicate through a byte array.
This seems to me like a problem that should have been fixed a long time ago so I'm wondering if there is a function for doing this in the Java and C libraries. If not, is there an easy way of making the conversion?