hi .
i have created one apllication in that i have download images and
stored into my sd card but while downloading my images are not stored
in my sd card folder so any help here is my code

class DThread extends Thread
    {
         public void run()
         {
                // Get a Connection Object
            HttpURLConnection conn;
            try
            {
                    for(int count=imageCount;count<=maxLength;count++ )
                        {

                        // Change URL to live Id

                        conn = (HttpURLConnection)new URL("url" + count +
".jpg" ).openConnection();

                                conn.setDoInput(true);
                                conn.connect();

                                InputStream is = conn.getInputStream();

                                Bitmap bm = BitmapFactory.decodeStream(is);
                                //Intended Page will get into Sd Card
                                FileOutputStream fos = new 
FileOutputStream("/sdcard/dirctory/
page"+ count + ".jpg");
                                bm.compress(CompressFormat.JPEG, 100, fos);
                                fos.flush();
                                fos.close();
                         }

                }
                catch (MalformedURLException e)
                {
                            e.printStackTrace();
                            Log.e("Malformed URL",e.toString());
                }
                catch (IOException e)
                {
                            e.printStackTrace();
                            Log.e("IO Exception",e.toString());
                }

but in this code it will catch the IOEXCEPTION so any suggestion for
that issue

plz help me  its urgent.
thanks.
jaimin

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to