private void putObjectArray1(Object[] array, int offset, int length) {
        int dimensions = 1;
        Class<?> componentType = array.getClass().getComponentType();

        while (componentType.isArray()) {
            componentType = componentType.getComponentType();
            dimensions++;
        }
        checkArrayLength(length, offset, array.length);
        int start = _size;
        ensureFit(12);
        _bytes[_size++] = (byte) (dimensions == 1 ? CLASS_ARRAY : CLASS_MULTI_ARRAY);
        encodeClass(componentType);
        if (dimensions != 1) {
            _bytes[_size++] = (byte) dimensions;
        }
        _size += encodeVariableLengthInt(COUNT1, _size, length);
        for (int index = 0; index < length; index++) {
            try {
                _depth++;
                put(array[index + offset]);
            } finally {
                _depth--;
            }
        }
        endVariableSizeItem(_size - start);
    }