use of cn.hutool.core.io.IORuntimeException in project hutool by looly.
the class Props method load.
/**
* 初始化配置文件
*
* @param resource {@link Resource}
*/
public void load(Resource resource) {
Assert.notNull(resource, "Props resource must be not null!");
this.resource = resource;
try (final BufferedReader reader = resource.getReader(charset)) {
super.load(reader);
} catch (IOException e) {
throw new IORuntimeException(e);
}
}
Aggregations