code: public static boolean copyFileToDirectory(final File source, final File destinationDir,
  		final boolean lastModified)
  		throws FileIsNotADirectoryException, IOException, FileIsADirectoryException
  	{
  		if (null == destinationDir)
  		{
  			throw new IllegalArgumentException("Destination must not be null");
  		}
  
  		if (!destinationDir.isDirectory())
  		{
  			throw new FileIsNotADirectoryException("Destination File-object '"
  				+ destinationDir.getAbsolutePath() + "' is not a directory.");
  		}
  		final File destinationFile = new File(destinationDir, source.getName());
  
  		return copyFile(source, destinationFile, lastModified);
  	}
docs: Copies the given source file to the given destination directory with the option to set the
  lastModified time from the given destination directory.
  
  @param source
  The source directory.
  @param destinationDir
  The destination directory.
  @param lastModified
  Flag the tells if the attribute lastModified has to be set with the attribute from
  the destination directory.
  
  @return 's true if the file is copied to the given directory, otherwise false.
  
  @throws FileIsNotADirectoryException
  Is thrown if the source file is not a directory.
  @throws IOException
  Is thrown if an error occurs by reading or writing.
  @throws FileIsADirectoryException
  Is thrown if the destination file is a directory.