001package hdf;
002
003import java.io.IOException;
004import java.io.InputStream;
005import java.util.Properties;
006
007/** a class to track the current versions of java, hdf4, hdf5 and hdfview */
008public class HDFVersions {
009    private static Properties props;
010
011    static
012    {
013        InputStream inst = null;
014        props            = new Properties();
015        try {
016            inst = HDFVersions.class.getResourceAsStream("/versions.properties");
017            props.load(inst);
018        }
019        catch (IOException e) {
020            e.printStackTrace();
021        }
022    }
023
024    /** @return the property to track the current versions of java */
025    public static String getPropertyVersionJava() { return props.getProperty("JAVA_VERSION"); }
026
027    /** @return the property to track the current versions of hdf4 */
028    public static String getPropertyVersionHDF4() { return props.getProperty("HDF4_VERSION"); }
029
030    /** @return the property to track the current versions of hdf5 */
031    public static String getPropertyVersionHDF5() { return props.getProperty("HDF5_VERSION"); }
032
033    /** @return the property to track the current versions of hdfview */
034    public static String getPropertyVersionView() { return props.getProperty("HDFVIEW_VERSION"); }
035}