Я извлекаю XML-канал из URL-адреса и затем разбираю его. То, что мне нужно сделать, это также хранить это внутри телефона, чтобы при отсутствии подключения к Интернету он мог анализировать сохраненную опцию, а не живую.
Проблема, с которой я сталкиваюсь, заключается в том, что я могу создать объект url, использовать getInputStream для получения содержимого, но он не позволит мне его сохранить.
URL url = null;
InputStream inputStreamReader = null;
XmlPullParser xpp = null;
url = new URL("http://*********");
inputStreamReader = getInputStream(url);
ObjectOutput out = new ObjectOutputStream(new FileOutputStream(new File(getCacheDir(),"")+"cacheFileAppeal.srl"));
//--------------------------------------------------------
//This line is where it is erroring.
//--------------------------------------------------------
out.writeObject( inputStreamReader );
//--------------------------------------------------------
out.close();
Любые идеи о том, как я могу сэкономить поток ввода, поэтому я могу загрузить его позже.
Приветствия