功能接收zip文件流,然后创建zip文件,现在想自己先写个demo读取zip文件,然后根据读取的数据在创建个zip
2条回答 默认 最新
itjava2017 2017-06-22 07:07关注HttpPost httppost = new HttpPost(url); FileBody bin = new FileBody(new File(zipPath)); //zipPath压缩包路径 StringBody comment = new StringBody(zipName); Charset charSet=Charset.forName("UTF-8"); StringBody context = new StringBody(obj.toString(),charSet); HttpEntity reqEntity =MultipartEntityBuilder.create().addPart("file", bin).addPart("filename", comment).build(); httppost.setEntity(reqEntity); HttpResponse response = httpclient.execute(httppost); int statusCode = response.getStatusLine().getStatusCode();本回答被题主选为最佳回答 , 对您是否有帮助呢?解决评论 打赏 举报无用 2