org.geoserver.util.IOUtils.filteredCopy()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.1k)|赞(0)|评价(0)|浏览(98)

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

IOUtils.filteredCopy介绍

[英]Copies from a reader to a file by performing a filtering on certain specified tokens. In particular, each key in the filters map will be looked up in the reader as ${key} and replaced with the associated value.
[中]通过对特定标记执行筛选,将读卡器复制到文件。特别是,过滤器映射中的每个键都将在读取器中作为${key}查找,并替换为关联的值。

代码示例

代码示例来源:origin: geoserver/geoserver

/**
 * Copies from a file to another by performing a filtering on certain specified tokens. In
 * particular, each key in the filters map will be looked up in the reader as ${key} and
 * replaced with the associated value.
 *
 * @param to
 * @param filters
 * @param reader
 * @throws IOException
 */
public static void filteredCopy(File from, File to, Map<String, String> filters)
    throws IOException {
  filteredCopy(new BufferedReader(new FileReader(from)), to, filters);
}
/**

代码示例来源:origin: geoserver/geoserver

File from = new File(source, path);
File to = new File(data, path);
IOUtils.filteredCopy(from, to, filters);

相关文章