設置conn.setRequestProperty("Range", "bytes=" + start + "-" + threadInfo.getEnd());報錯java.lang.IllegalStateException: Cannot set request property after connection is made 這是為什么?
1 回答

四無小青年
TA貢獻88條經驗 獲得超43個贊
按照包錯的字面信息理解是“連接后無法設置請求屬性“,你的是不是在調用了connect()或者getOutputStream()方法之后才調用setRequestProperty?如果是,就把這個調用挪到前面去。若解惑,望采納
添加回答
舉報
0/150
提交
取消