public final static int OBJECT_ID_LEN = 4; // 4 bytes = 32 bits
public final static int METHOD_ID_LEN = 4; // 4 bytes = 32 bits
public final static int PARAM_LEN = 4; // 4 bytes = 32 bits (4-byte field that stores the length of the param)
+ public final static int RETURN_LEN = 4; // 4 bytes = 32 bits (4-byte field that stores the length of the return object)
public final static int SHT_LEN = 2;
public final static int INT_LEN = 4;
public static Object getParamObjectArray(Class<?> type, byte[] paramBytes) {
Object retObj = null;
- System.out.println("Got here!!!");
if ((type == byte[].class) ||
(type == byte.class)) {
retObj = (Object) paramBytes;
byte[] retObjBytes = null;
if (obj instanceof Byte) {
- retObjBytes = (byte[]) obj;
+ retObjBytes = new byte[] { (byte) obj };
} else if (obj instanceof Short) {
retObjBytes = shortToByteArray((short) obj);
} else if (obj instanceof Integer) {