private Object getMultiArray(Class<?> prototype) {
        int start = _next;
        int type = nextType(CLASS_MULTI_ARRAY, CLASS_REREF);
        if (type == CLASS_REREF) {
            _next = start;
            Object array = get(null, null);
            if (array == null || array.getClass().isArray()) {
                return array;
            } else {
                throw new ConversionException("Referenced object is not an array");
            }
        }
        Object result;
        try {
            _depth++;
            int componentClassHandle = nextType();
            checkSize(1);
            int dimensions = _bytes[_next++] & 0xFF;
            if (prototype == null) {
                prototype = Array.newInstance(classForHandle(componentClassHandle), new int[dimensions]).getClass();
            }
            int length = decodeElementCount();
            result = Array.newInstance(prototype.getComponentType(), length);

            _serializedItemCount++;
            registerEncodedObject(result);

            Class<?> componentType = prototype.getComponentType();
            if (componentType.getComponentType().isArray()) {
                for (int index = 0; index < length; index++) {
                    Array.set(result, index, getMultiArray(componentType));
                }
            } else {
                for (int index = 0; index < length; index++) {
                    Array.set(result, index, get(null, null));
                }
            }
        } finally {
            _depth--;
        }
        closeVariableLengthItem();
        return result;
    }