public static void copyFile(File sourceFile, File toFile) {
		FileInputStream inputStream = null;
		FileOutputStream outputStream = null;
		try {
			int len;
			inputStream = new FileInputStream(sourceFile);
			File tempFile = new File(toFile.getParent());
			if(!tempFile.exists()){
				tempFile.mkdirs();
			}
			if(!toFile.exists()){ 
				toFile.createNewFile();
			}
			outputStream = new FileOutputStream(toFile);
			while ((len = inputStream.read(buf)) != -1) {
				outputStream.write(buf, 0, len);
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
			throw new FileNotExistException();
		} catch (IOException e) {
			e.printStackTrace();
			throw new CopyFileErrorException("ڿļ:"+sourceFile.getAbsolutePath()+" ʱʧ");
		} finally {
			try {
				if (inputStream != null) {
					inputStream.close();
				}
				if (outputStream != null) {
					outputStream.close();
				}
			} catch (IOException e) {
				e.printStackTrace();
				throw new CopyFileErrorException("ڹرļʱʧ");
			}
		}
	}