class LocalCommand implements ICommand {

	@Override
	public void copy(String sourcePath, String targetPath) throws IOException  {

		/* Fast java copy file */
		if(logger.isDebugEnabled()) {
			logger.debug("local copy from " + sourcePath + " to " + targetPath);
		}
		File tDestFile = new File(targetPath);
		File tSourceFile = new File(sourcePath);

		if (!tDestFile.exists()) {
			tDestFile.createNewFile();
		}

		FileChannel source = null;
		FileChannel destination = null;

		try {
			source = new FileInputStream(tSourceFile).getChannel();
			destination = new FileOutputStream(tDestFile).getChannel();
			destination.transferFrom(source, 0, source.size());
		} finally {
			if (source != null) {
				source.close();
			}
			if (destination != null) {
				destination.close();
			}
		}
		
		if(logger.isDebugEnabled()) {
			logger.debug("local copy done ");
		}
	}

	public  LocalCommand();

}