com.typesafe.config.Config.getBytesList()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(85)

本文整理了Java中com.typesafe.config.Config.getBytesList()方法的一些代码示例,展示了Config.getBytesList()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.getBytesList()方法的具体详情如下:
包路径:com.typesafe.config.Config
类名称:Config
方法名:getBytesList

Config.getBytesList介绍

暂无

代码示例

代码示例来源:origin: apache/drill

@Override
public List<Long> getBytesList(String path) {
 return c.getBytesList(path);
}

代码示例来源:origin: dremio/dremio-oss

@Override
public List<Long> getBytesList(String path) {
 return config.getBytesList(path);
}

代码示例来源:origin: org.apache.drill/drill-common

@Override
public List<Long> getBytesList(String path) {
 return c.getBytesList(path);
}

代码示例来源:origin: com.github.ddth/ddth-commons-core

/**
 * Get a configuration as list of sizes in bytes (parses special strings like "1Mb"). Return
 * {@code null} if missing, wrong type or bad value.
 *
 * @param config
 * @param path
 * @return
 */
public static List<Long> getBytesList(Config config, String path) {
  try {
    return config.getBytesList(path);
  } catch (ConfigException.Missing | ConfigException.WrongType | ConfigException.BadValue e) {
    if (e instanceof ConfigException.WrongType || e instanceof ConfigException.BadValue) {
      LOGGER.warn(e.getMessage(), e);
    }
    return null;
  }
}

相关文章