public static void clientUpload(final Socket socket,InputStream inputStream, DataInputStream datais,String extension,String basepath,String pathPrefix){
		System.out.println("client file stuffix: " + extension);
		String uuid = UUID.randomUUID().toString().toUpperCase();
		// 得到存储路径
		String storepath = Folder.getStoragePath(uuid);
		// 文件存储路径
		File file = new File(storepath);
		DataOutputStream dataOutputStream=null;
		BufferedInputStream bufferedInputStream=null;
		try {
			FileOutputStream fileOutputStream=new FileOutputStream(file);
			BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(fileOutputStream);
			// 获取文件流的大小
			int size = datais.readInt();
			System.out.println("server file size:" + size);
			// InputStreamReader将字节流转化为字符流
			bufferedInputStream = new BufferedInputStream(inputStream);
			// 读取客户端数据
			int len = 0;
			byte[] buf = new byte[1024];
			// 客户端不关闭,br.read(buf);会一直等待,所以必须
			// 手动判断退出循环
			System.out.println("virtual times:" + (float) size/ (float) buf.length);
			double times = Math.ceil((float) size / (float) buf.length);
			System.out.println("read times:" + times);
			for (int i = 0; i < times; i++) {
				len = bufferedInputStream.read(buf);
				bufferedOutputStream.write(buf, 0, len);
				bufferedOutputStream.flush();
			}
			
			bufferedOutputStream.close();
			fileOutputStream.close();
			storepath = storepath + "." + extension;
			// 文件重命名需把该文件有关的流关闭
			file.renameTo(new File(storepath));
			storepath = storepath.replaceAll(basepath, pathPrefix);
			System.out.println("access path:" + storepath);
			dataOutputStream = new DataOutputStream(socket.getOutputStream());
			dataOutputStream.writeUTF(storepath);
			dataOutputStream.flush();
			//更新
			String path="statistics";
			int fileCount=Integer.parseInt(PropertiesUtil.getValue("fileCount",path));
			PropertiesUtil.setValue("fileCount", (++fileCount)+"",path, "statistics file count");
			String uploadOver=datais.readUTF();
			// 读取客户端传递的数据，客户端上传完毕，从服务端关闭客户端sock
			System.out.println(uploadOver);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if(datais!=null){
					datais.close();
				}
				if(dataOutputStream!=null){
					dataOutputStream.close();
				}
				if(socket!=null){
					socket.close();
				}
				if(bufferedInputStream!=null){
					bufferedInputStream.close();
				}
				if(inputStream!=null){
					inputStream.close();
				}
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}