// 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;
package com.mollychin.utils;




public class DownloadUtil {
	/**
	 * 下载一个的图片
	 * 
	 * @param urlString
	 * @param fileName
	 * @return
	 * @throws IOException
	 */
	public static String downloadPicture(String urlString, String fileName,
			String picType) throws IOException {
// 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;

package com.mollychin.utils;




public class DownloadUtil {
	/**
	 * 下载一个的图片
	 * 
	 * @param urlString
	 * @param fileName
	 * @return
	 * @throws IOException
	 */
	public static String downloadPicture(String urlString, String fileName,
			String picType) throws IOException {
		File file = new File(LOCAL_PICTURE_PATH);