public static void copyFile(String srcName, String dstName) throws IOException {
        InputStream src = new FileInputStream(srcName);
        OutputStream dst = new FileOutputStream(dstName);
        byte[] buf = new byte[1024];
        int len;
        while ((len = src.read(buf)) > 0) {
            dst.write(buf, 0, len);
        }
        src.close();
        dst.close();
    }
Copies src file to dst file. If the dst file does not exist, it is created.
container-search/src/test/java/com/yahoo/search/searchchain/config/test/SearchChainConfigurerTestCase.java