メソッドの接続解除元がHttpURLConnection
正しく機能していないようです。次のコードを実行すると:
url = new URL("http:// ...");
connection = (HttpURLConnection) url.openConnection ();
connection.setRequestMethod("POST");
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
connection.setUseCaches(false);
connection.setDoInput(true);
connection.setDoOutput(true);
connection.connect();
// Some code
connection.disconnect();
connection.setDoInput(false); // -> IllegalStateException
IllegalStateException
メソッドを呼び出すとが得られsetDoInput
ます。例外は言う:
接続済み