byte[] retObjBytes = null;
if (retObj != null) // Handle nullness
retObjBytes = IoTRMIUtil.getObjectBytes(retObj);
// Send return value together with OBJECT_ID and METHOD_ID for arbitration
int objMethIdLen = IoTRMIUtil.OBJECT_ID_LEN + IoTRMIUtil.METHOD_ID_LEN;
int headerLen = objMethIdLen + IoTRMIUtil.PACKET_TYPE_LEN;
byte[] retObjBytes = null;
if (retObj != null) // Handle nullness
retObjBytes = IoTRMIUtil.getObjectBytes(retObj);
// Send return value together with OBJECT_ID and METHOD_ID for arbitration
int objMethIdLen = IoTRMIUtil.OBJECT_ID_LEN + IoTRMIUtil.METHOD_ID_LEN;
int headerLen = objMethIdLen + IoTRMIUtil.PACKET_TYPE_LEN;