//read constructor public Message(byte[] buffer, int receivedSize) { data = new byte[receivedSize - 1]; command = (Enum_Action)buffer[0]; for (int i = 1; i < receivedSize; i++) { data[i - 1] = buffer[i]; } }
//constructor public Message(Enum_Action action) { command = action; data = new byte[63]; }