Load hash table from file
This task use java to load hash table from file.
Load hash table from file using FileInputStream
1 | public void loadHash(Properties properties, String filename) { |
2 | try { |
3 | FileInputStream fis = new FileInputStream(filename); |
4 | properties.load(fis); |
5 | fis.close(); |
6 | } catch (Exception e) { |
7 | logger.error("", e); |
8 | } |
9 | } |
public void loadHash(Properties properties, String filename) { try { FileInputStream fis = new FileInputStream(filename); properties.load(fis); fis.close(); } catch (Exception e) { logger.error("", e); } }
No comments:
Post a Comment