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 /** 025 * Get the property to track the current versions of java 026 * 027 * @return the property to track the current versions of java 028 */ 029 public static String getPropertyVersionJava() { return props.getProperty("JAVA_VERSION"); } 030 031 /** 032 * Get the property to track the current versions of hdf4 033 * 034 * @return the property to track the current versions of hdf4 035 */ 036 public static String getPropertyVersionHDF4() { return props.getProperty("HDF4_VERSION"); } 037 038 /** 039 * Get the property to track the current versions of hdf5 040 * 041 * @return the property to track the current versions of hdf5 042 */ 043 public static String getPropertyVersionHDF5() { return props.getProperty("HDF5_VERSION"); } 044 045 /** 046 * Get the property to track the current versions of hdfview 047 * 048 * @return the property to track the current versions of hdfview 049 */ 050 public static String getPropertyVersionView() { return props.getProperty("HDFVIEW_VERSION"); } 051}