I have a gzipped (*.gz) file in my res/raw directory. I'm wanting to
open and read from this file, however I'm a bit uncertain how to go
about it. This is what I have currently:
try{
InputStream is = this.getResources().openRawResource
(R.raw.mygztextfile);
BufferedReader reader = new BufferedReader(new InputStreamReader
(new GZIPInputStream(is)));
Log.d("DEBUG", "Buffered Reader created");
String line = null;
while ((line = reader.readLine()) != null) {
Log.d("DEBUG", line);
}
}
catch(IOException ex){
Log.d("ERROR", ex.getMessage());
}
What happens is the application hangs while it's creating the
InputStream and BufferedReader. No force close or any errors in the
logcat other than a timeout message. Am I doing this right? All the
examples of GZIPInputStream show accessing a file from a filesystem
more like a desktop.
Thanks for any help or suggestions.
Justin
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en