在以下 Android 代码中,我从 getInputStream 获得了 EOFException。
private void downloadUrl() {
    HttpsURLConnection conn = null;
    DataOutputStream printout = null;
    try {
        try {
            conn = (HttpsURLConnection) new URL("some url").openConnection();
            conn.setRequestMethod("POST");
            conn.setDoInput(true);
            conn.setDoOutput(true);
            conn.setUseCaches(false);
            conn.setAllowUserInteraction(false);
            conn.setRequestProperty("Accept", "application/json");
            conn.setRequestProperty("Content-Type", "application/json; charset=utf-8");
        } 
        catch (ProtocolException e){
        }
        JSONObject jsonReq = new JSONObject();
        jsonReq.put("userID", "id");
        jsonReq.put("password", "1234");
        OutputStream output = conn.getOutputStream();
        try {
            OutputStreamWriter wr = new OutputStreamWriter(output);
            wr.write(URLEncoder.encode(jsonReq.toString(),"utf-8")); 
            wr.flush();
            wr.close();
        }
        catch (IOException e) {
        }
        InputStream in = conn.getInputStream();   //I get EOFException here
        try {
            BufferedReader rd  = new BufferedReader(new InputStreamReader(in));
            String responseSingle = null;
            while ((responseSingle = rd.readLine()) != null) {
                response = response + responseSingle;
            }
            rd.close(); 
        }
        catch (IOException e) {
        }
        finally {
            if (in != null)
            in.close();
        }
    } 
    catch (IOException e){
    } 
    catch (JSONException e) {
    } 
    finally{
        if(conn!=null)  
            conn.disconnect();
    }  
}
是什么导致了这个异常?