第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

上傳圖片,不成功???沒反應(yīng)

上傳圖片,不成功???沒反應(yīng)


URL httpUrl=new URL(url);
???HttpURLConnection conn=(HttpURLConnection)httpUrl.openConnection();
???conn.setRequestMethod("POST");
???conn.setDoOutput(true);
???conn.setDoInput(true);//請(qǐng)求屬性
???conn.setRequestProperty("Content-Type","multipart/form-data;boundary="+boundary);
???DataOutputStream out=new DataOutputStream(conn.getOutputStream());
???out.writeBytes(prefix+boundary+end);
???out.writeBytes("Content-Disposition:form-data;"+"name=\"upload\";filename=\""+"Sky.jpg"+"\""+end);
???out.writeBytes(end);//回車換行符
???FileInputStream fileInputStream=new FileInputStream(new File(fileName));
???byte[] b=new byte[1024*4];
???int len;
???while((len=fileInputStream.read(b))!=-1){
????out.write(b,0,len);
???}
???out.writeBytes(end);
???out.writeBytes(prefix+boundary+prefix+end);//最后結(jié)束行
???out.flush();
???

正在回答

舉報(bào)

0/150
提交
取消
Android中的Http通信
  • 參與學(xué)習(xí)       64653    人
  • 解答問題       347    個(gè)

了解Android-http網(wǎng)絡(luò)編程應(yīng)用,常見忘了請(qǐng)求相關(guān)應(yīng)用

進(jìn)入課程

上傳圖片,不成功???沒反應(yīng)

我要回答 關(guān)注問題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)