I get as an argument data which is of type char[].
Given the information data is organized as a Packet object. How do I convert data to be a Packet? Packet includes primitive fields, and array of object consisting of primitive fields too. Is there a way doing it in Java? I know in C, C++ it is easy...
class Square{
float x;
float y;
int size;
}
class Packet{
int first;
int last;
Square s[];
}