Hello everyone,

I am trying to downlaod a file from the  net. It is an mp3 file and
big in size. I  m able to get connection but when trying to create a
bufffer for file, I get out of memory exception....
please help
its urgent...
Code is:
URL u = new URL("http://----------";);
   URLConnection uc = u.openConnection();
 int contentLength = uc.getContentLength();
InputStream raw = uc.getInputStream();
   InputStream in = new BufferedInputStream(raw);
   byte [] data=new byte[contentLength];    //getting outofmemory
exception here..Hello everyone,


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to