code: public static void copyFile(File src, File dest, StreamMonitor monitor) throws IOException, FileNotFoundException {
          FileInputStream fis = null;
          FileOutputStream fos = null;
          int length = (int) src.length();
          try {
              fis = new FileInputStream(src);
              fos = new FileOutputStream(dest);
              StreamUtils.copyStream(monitor, src.toURI().toURL(), length, fis, fos, true);
          } catch (FileNotFoundException e) {
              reportError(monitor, e, src.toURI().toURL());
              throw e;
          } catch (NullArgumentException e) {
              reportError(monitor, e, src.toURI().toURL());
              throw e;
          } catch (MalformedURLException e) {
              reportError(monitor, e, src.toURI().toURL());
              throw e;
          } catch (IOException e) {
              reportError(monitor, e, src.toURI().toURL());
              throw e;
          }
      }
docs: Copies a file.
  
  @param src
  The source file.
  @param dest
  The destination file.
  @param monitor
  The monitor to use for reporting.
  @throws IOException
  if any underlying I/O problem occurs.
  @throws FileNotFoundException
  if the source file does not exist.