Thursday 22 December 2011

Load hash table from string

Load hash table from string
This task use java to load hash table from string.
Load hash table from string using ByteArrayInputStream
public void readHash(Properties properties, String src) {
    try {
        ByteArrayInputStream bais = new ByteArrayInputStream(src.getBytes()); 
        properties.load(bais);
        bais.close();
    } catch (Exception e) {
        logger.error("", e);
    }
}
    

  Protected by Copyscape Online Copyright Protection

No comments:

Post a Comment