/** * 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); }