本文整理了Java中org.geoserver.util.IOUtils.filteredCopy()
方法的一些代码示例,展示了IOUtils.filteredCopy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IOUtils.filteredCopy()
方法的具体详情如下:
包路径:org.geoserver.util.IOUtils
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!