1 4 package nl.justobjects.pushlet.util; 5 6 7 import java.io.IOException ; 8 import java.util.Properties ; 9 import java.util.Timer ; 10 11 17 public class Sys { 18 19 20 21 static public Properties loadPropertiesResource(String aResourcePath) throws IOException { 22 try { 23 ClassLoader classLoader = Sys.class.getClassLoader(); 28 29 Properties properties = new Properties (); 30 31 properties.load(classLoader.getResourceAsStream(aResourcePath)); 33 return properties; 34 } catch (Throwable t) { 35 throw new IOException ("failed loading Properties resource from " + aResourcePath); 36 } 37 } 38 39 40 static public long now() { 41 return System.currentTimeMillis(); 42 } 43 44 } 45 | Popular Tags |