All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.ydb.core.utils.Version Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package tech.ydb.core.utils;

import java.io.InputStream;
import java.util.Optional;
import java.util.Properties;

public class Version {

    public static final String UNKNOWN_VERSION = "unknown-version";

    private Version() {
        //
    }

    public static Optional getVersion() {
        try {
            Properties prop = new Properties();
            InputStream in = Version.class.getResourceAsStream("/ydb_sdk_version.properties");
            prop.load(in);
            return Optional.ofNullable(prop.getProperty("version"));
        } catch (Exception ex) {
            return Optional.empty();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy