private ObjectDef readObjectDef(ByteBuffer buffer) throws IOException{
        ObjectDef def = new ObjectDef();

        def.objectId = buffer.getShort();
        def.objectName = readString(buffer);

        int numMethods = buffer.get() & 0xff;
        MethodDef[] methodDefs = new MethodDef[numMethods];
        for (int i = 0; i < numMethods; i++){
            methodDefs[i] = readMethod(buffer);
        }
        def.methodDefs = methodDefs;
        return def;
    }
{@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