// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String COMPUTER_IP_ADDRESS = "http://www.icodes.vip";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String LOCAL_MUSIC_PATH = LOCAL_PATH + "/musicFile/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String LOCAL_PICTURE_PATH = LOCAL_PATH
// 		+ "/PictureFile/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String LOCAL_RECITATION_PATH = LOCAL_PATH
// 		+ "/recitationFile/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String MUSIC_PROJECT_PATH = FILE_PATH + "/MusicFile/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String PICTURE_MOVIE = "Picture4Movie/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String PICTURE_MUSIC = "Picture4Music/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String PICTURE_ONE = "Picture4One/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String PICTURE_PROJECT_PATH = FILE_PATH
// 		+ "/PictureFile/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String PICTURE_ZHIHU = "Picture4Zhihu/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String RECITATION_PROJECT_PATH = FILE_PATH
// 		+ "/RecitationFile/";


import static com.mollychin.utils.ConstantsUtil.COMPUTER_IP_ADDRESS;
import static com.mollychin.utils.ConstantsUtil.LOCAL_MUSIC_PATH;
import static com.mollychin.utils.ConstantsUtil.LOCAL_PICTURE_PATH;
import static com.mollychin.utils.ConstantsUtil.LOCAL_RECITATION_PATH;
import static com.mollychin.utils.ConstantsUtil.MUSIC_PROJECT_PATH;
import static com.mollychin.utils.ConstantsUtil.PICTURE_MOVIE;
import static com.mollychin.utils.ConstantsUtil.PICTURE_MUSIC;
import static com.mollychin.utils.ConstantsUtil.PICTURE_ONE;
import static com.mollychin.utils.ConstantsUtil.PICTURE_PROJECT_PATH;
import static com.mollychin.utils.ConstantsUtil.PICTURE_ZHIHU;
import static com.mollychin.utils.ConstantsUtil.RECITATION_PROJECT_PATH;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import sun.misc.BASE64Encoder;
		String localPicturePath = "";
		String projectPicturePath = "";

		if (!file.exists() && !file.isDirectory()) {
			file.mkdir();
		}
		if (picType.equals(PICTURE_ONE)) {
			localPicturePath = LOCAL_PICTURE_PATH + PICTURE_ONE;
			projectPicturePath = PICTURE_PROJECT_PATH + PICTURE_ONE;

		} else if (picType.equals(PICTURE_MOVIE)) {
			localPicturePath = LOCAL_PICTURE_PATH + PICTURE_MOVIE;
			projectPicturePath = PICTURE_PROJECT_PATH + PICTURE_MOVIE;

		} else if (picType.equals(PICTURE_ZHIHU)) {
			localPicturePath = LOCAL_PICTURE_PATH + PICTURE_ZHIHU;
			projectPicturePath = PICTURE_PROJECT_PATH + PICTURE_ZHIHU;
		} else if (picType.equals(PICTURE_MUSIC)) {
			localPicturePath = LOCAL_PICTURE_PATH + PICTURE_MUSIC;
			projectPicturePath = PICTURE_PROJECT_PATH + PICTURE_MUSIC;
		}
		if (!(fileName.endsWith(".jpg") || fileName.endsWith(".png"))) {
			fileName = changeName(fileName) + ".jpg";
		} else {
			String prex = fileName.substring(0, fileName.length() - 4);
			fileName.replace(prex, changeName(prex));
		}

		download(urlString, fileName, localPicturePath, projectPicturePath);
		if (picType.equals(PICTURE_ONE)) {
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String COMPUTER_IP_ADDRESS = "http://www.icodes.vip";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String LOCAL_MUSIC_PATH = LOCAL_PATH + "/musicFile/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String LOCAL_PICTURE_PATH = LOCAL_PATH
// 		+ "/PictureFile/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String LOCAL_RECITATION_PATH = LOCAL_PATH
// 		+ "/recitationFile/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String MUSIC_PROJECT_PATH = FILE_PATH + "/MusicFile/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String PICTURE_MOVIE = "Picture4Movie/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String PICTURE_MUSIC = "Picture4Music/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String PICTURE_ONE = "Picture4One/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String PICTURE_PROJECT_PATH = FILE_PATH
// 		+ "/PictureFile/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String PICTURE_ZHIHU = "Picture4Zhihu/";
// 
// Path: server/4FunServer/src/com/mollychin/utils/ConstantsUtil.java
// public static final String RECITATION_PROJECT_PATH = FILE_PATH
// 		+ "/RecitationFile/";


// Path: server/4FunServer/src/com/mollychin/utils/DownloadUtil.java
import static com.mollychin.utils.ConstantsUtil.COMPUTER_IP_ADDRESS;
import static com.mollychin.utils.ConstantsUtil.LOCAL_MUSIC_PATH;
import static com.mollychin.utils.ConstantsUtil.LOCAL_PICTURE_PATH;
import static com.mollychin.utils.ConstantsUtil.LOCAL_RECITATION_PATH;
import static com.mollychin.utils.ConstantsUtil.MUSIC_PROJECT_PATH;
import static com.mollychin.utils.ConstantsUtil.PICTURE_MOVIE;
import static com.mollychin.utils.ConstantsUtil.PICTURE_MUSIC;
import static com.mollychin.utils.ConstantsUtil.PICTURE_ONE;
import static com.mollychin.utils.ConstantsUtil.PICTURE_PROJECT_PATH;
import static com.mollychin.utils.ConstantsUtil.PICTURE_ZHIHU;
import static com.mollychin.utils.ConstantsUtil.RECITATION_PROJECT_PATH;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import sun.misc.BASE64Encoder;

		String localPicturePath = "";
		String projectPicturePath = "";

		if (!file.exists() && !file.isDirectory()) {
			file.mkdir();
		}
		if (picType.equals(PICTURE_ONE)) {
			localPicturePath = LOCAL_PICTURE_PATH + PICTURE_ONE;
			projectPicturePath = PICTURE_PROJECT_PATH + PICTURE_ONE;

		} else if (picType.equals(PICTURE_MOVIE)) {
			localPicturePath = LOCAL_PICTURE_PATH + PICTURE_MOVIE;
			projectPicturePath = PICTURE_PROJECT_PATH + PICTURE_MOVIE;

		} else if (picType.equals(PICTURE_ZHIHU)) {
			localPicturePath = LOCAL_PICTURE_PATH + PICTURE_ZHIHU;
			projectPicturePath = PICTURE_PROJECT_PATH + PICTURE_ZHIHU;
		} else if (picType.equals(PICTURE_MUSIC)) {
			localPicturePath = LOCAL_PICTURE_PATH + PICTURE_MUSIC;
			projectPicturePath = PICTURE_PROJECT_PATH + PICTURE_MUSIC;
		}
		if (!(fileName.endsWith(".jpg") || fileName.endsWith(".png"))) {
			fileName = changeName(fileName) + ".jpg";
		} else {
			String prex = fileName.substring(0, fileName.length() - 4);
			fileName.replace(prex, changeName(prex));
		}

		download(urlString, fileName, localPicturePath, projectPicturePath);
		if (picType.equals(PICTURE_ONE)) {
			return COMPUTER_IP_ADDRESS + "/4Fun/PictureFile/" + PICTURE_ONE