    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        InputStream inst = null;
    013        props = new Properties();
    014        try {
    015            inst = HDFVersions.class.getResourceAsStream("/versions.properties");
    016            props.load(inst);
    017        }
    018        catch (IOException e) {
    019            e.printStackTrace();
    020        }
    021    }
    022
    023    /** @return the property to track the current versions of java */
    024    public static String getPropertyVersionJava(){
    025        return props.getProperty("JAVA_VERSION");
    026    }
    027
    028    /** @return the property to track the current versions of hdf4 */
    029    public static String getPropertyVersionHDF4(){
    030        return props.getProperty("HDF4_VERSION");
    031    }
    032
    033    /** @return the property to track the current versions of hdf5 */
    034    public static String getPropertyVersionHDF5(){
    035        return props.getProperty("HDF5_VERSION");
    036    }
    037
    038    /** @return the property to track the current versions of hdfview */
    039    public static String getPropertyVersionView(){
    040        return props.getProperty("HDFVIEW_VERSION");
    041    }
    042}
    043