Thursday 22 December 2011

Save hash table to file

Save hash table to file
This task use java to save hash table to file.
Save hash table to file using FileOutputStream
public void saveHash(Properties properties, String filename) {
    try {
        FileOutputStream fos = new FileOutputStream(filename); 
        properties.store(fos, "");
        fos.close();
    } catch (Exception e) {
        logger.error("", e);
    }
}
    

  Protected by Copyscape Online Copyright Protection

No comments:

Post a Comment