Код, вставленный ниже, был взят из java docs на HttpURLConnection.
Я получаю следующую ошибку:
readStream(in)
поскольку такого метода нет.
Я вижу то же самое в
Обзор класса для URLConnection в
URLConnection.getInputStream()
Где readStream
? Ниже приведен фрагмент кода:
URL url = new URL("http://www.android.com/");
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
try
{
InputStream in = new BufferedInputStream(urlConnection.getInputStream());
readStream(in); <-----NO SUCH METHOD
}
finally
{
urlConnection.disconnect();
}