code: protected void copyFile(File outputDirectory,
                              File sourceFile,
                              String targetFileName) throws IOException
      {
          InputStream fileStream = new FileInputStream(sourceFile);
          try
          {
              copyStream(outputDirectory, fileStream, targetFileName);
          }
          finally
          {
              fileStream.close();
          }
      }
docs: Copy a single named file to the output directory.
  @param outputDirectory The destination directory for the copied resource.
  @param sourceFile The path of the file to copy.
  @param targetFileName The name of the file created in {@literal outputDirectory}.
  @throws IOException If the file cannot be copied.