Advertisement
s_m4rt

Untitled

Nov 10th, 2015
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. package util;
  2.  
  3. import java.io.File;
  4. import java.io.FileInputStream;
  5. import java.util.Properties;
  6.  
  7. public class Util {
  8. public static Properties getProperties(String path){
  9. File file = new File(path);
  10. if (!file.exists()) return null;
  11. Properties properties = new Properties();
  12. try{
  13. FileInputStream in=new FileInputStream(file);
  14. properties.load(in);;
  15. in.close();
  16. } catch (Exception e){
  17. e.printStackTrace();
  18. }
  19. return properties;
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement