@SuppressWarnings("resource")
	public static void copy(File src, File dst) throws IOException {

		// Took following recipe from
		// http://stackoverflow.com/questions/106770/standard-concise-way-to-copy-a-file-in-java
		// The nio package seems to be the most efficient way to copy a file
		FileChannel source = null;
		FileChannel destination = null;

		try {
			// we need the supress warnings here (the warning that the stream is not closed is harmless)
			// see http://stackoverflow.com/questions/12970407/does-filechannel-close-close-the-underlying-stream
			source = new FileInputStream(src).getChannel();
			destination = new FileOutputStream(dst).getChannel();
			destination.transferFrom(source, 0, source.size());
		} finally {
			if (source != null) {
				source.close();
			}
			if (destination != null) {
				destination.close();
			}
		}
	}
@ SuppressWarnings ( "resource" ) public static void copy ( File src , File dst ) throws IOException { FileChannel source = null ; FileChannel destination = null ; try { source = new FileInputStream ( src ) . getChannel ( ) ; destination = new FileOutputStream ( dst ) . getChannel ( ) ; destination . transferFrom ( source , 0 , source . size ( ) ) ; } finally { if ( source != null ) { source . close ( ) ; } if ( destination != null ) { destination . close ( ) ; } } }
Copy the content of file src to dst TODO since java 1.7 this is provided
in java.nio.file.Files

@param src
@param dst
@throws IOException