/*
 * SDK Pullenti Unitext, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software. 
 * This class is generated using the converter Unisharping (www.unisharping.ru) from Pullenti C# project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */

package com.pullenti.unitext.internal.zip;

/**
 * An abstract <see cref="IArchiveStorage"/> suitable for extension by inheritance.
 */
public abstract class BaseArchiveStorage implements IArchiveStorage {

    /**
     * Initializes a new instance of the <see cref="BaseArchiveStorage"/> class.
     * @param _updateMode The update mode.
     */
    protected BaseArchiveStorage(FileUpdateMode _updateMode) {
        updateMode_ = _updateMode;
    }

    /**
     * Gets a temporary output <see cref="Stream"/>
     * @return Returns the temporary output stream.
     */
    @Override
    public abstract com.pullenti.unisharp.Stream getTemporaryOutput();

    /**
     * Converts the temporary <see cref="Stream"/> to its final form.
     * @return Returns a <see cref="Stream"/> that can be used to read 
     * the final storage for the archive.
     */
    @Override
    public abstract com.pullenti.unisharp.Stream convertTemporaryToFinal();

    /**
     * Make a temporary copy of a <see cref="Stream"/>.
     * @param stream The <see cref="Stream"/> to make a copy of.
     * @return Returns a temporary output <see cref="Stream"/> that is a copy of the input.
     */
    @Override
    public abstract com.pullenti.unisharp.Stream makeTemporaryCopy(com.pullenti.unisharp.Stream stream);

    /**
     * Return a stream suitable for performing direct updates on the original source.
     * @param stream The <see cref="Stream"/> to open for direct update.
     * @return Returns a stream suitable for direct updating.
     */
    @Override
    public abstract com.pullenti.unisharp.Stream openForDirectUpdate(com.pullenti.unisharp.Stream stream);

    /**
     * Disposes this instance.
     */
    @Override
    public abstract void close();

    @Override
    public FileUpdateMode getUpdateMode() {
        return updateMode_;
    }


    private FileUpdateMode updateMode_ = FileUpdateMode.SAFE;
    public BaseArchiveStorage() {
    }
}
