private RemoteObjectDefMessage readObjectDefs(ByteBuffer buffer) throws IOException{
        RemoteObjectDefMessage defMsg = new RemoteObjectDefMessage();
        int numObjs = buffer.get() & 0xff;
        ObjectDef[] defs = new ObjectDef[numObjs];
        for (int i = 0; i < numObjs; i++){
            defs[i] = readObjectDef(buffer);
        }
        defMsg.objects = defs;
        return defMsg;
    }
{@link RmiSerializer} is responsible for serializing RMI messages
like define object, call, and return.

@author Kirill Vainer
jme3-networking/src/main/java/com/jme3/network/rmi/RmiSerializer.java