/*
 * 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;

/**
 * Default implementation of <see cref="IDynamicDataSource"/> for files stored on disk.
 */
public class DynamicDiskDataSource implements IDynamicDataSource {

    /**
     * Initialise a default instance of <see cref="DynamicDiskDataSource"/>.
     */
    public DynamicDiskDataSource() {
    }

    /**
     * Get a <see cref="Stream"/> providing data for an entry.
     * @param entry The entry to provide data for.
     * @param name The file name for data if known.
     * @return Returns a stream providing data; or null if not available
     */
    @Override
    public com.pullenti.unisharp.Stream getSource(ZipEntry entry, String name) {
        try {
            com.pullenti.unisharp.Stream result = null;
            if (name != null) 
                result = new com.pullenti.unisharp.FileStream(name, "r", "");
            return result;
        } catch (Exception ex123) {
            return null;
        }
    }
}
