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);
}
}
No comments:
Post a Comment