/*
 * 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 a <see cref="IStaticDataSource"/> for use with files stored on disk.
 */
public class StaticDiskDataSource implements IStaticDataSource {

    /**
     * Initialise a new instnace of <see cref="StaticDiskDataSource"/>
     * @param fileName The name of the file to obtain data from.
     */
    public StaticDiskDataSource(String fileName) {
        fileName_ = fileName;
    }

    /**
     * Get a <see cref="Stream"/> providing data.
     * @return Returns a <see cref="Stream"/> provising data.
     */
    @Override
    public com.pullenti.unisharp.Stream getSource() {
        try {
            return new com.pullenti.unisharp.FileStream(fileName_, "r", "");
        } catch (Exception ex123) {
            return null;
        }
    }

    private String fileName_;
    public StaticDiskDataSource() {
    }
}
