Hi, John after changing code like following I think it is working (i
had tried only on small data till)
try
{
imageFile.createNewFile();
PrintWriter out = new PrintWriter(imageFile);
URL yahoo = new URL("URL");
BufferedReader in = new BufferedReader(new
InputStreamReader(yahoo.openStream()));
char[] buffer = new char[2048];
ByteArrayOutputStream baos = new ByteArrayOutputStream();
BufferedWriter bw = new BufferedWriter(out);
while ((size = in.read(buffer, 0, buffer.length)) != -1)
{
System.out.println ("Inside while!!!!!!!!!!!!");
total += size ;
bw.write(buffer, 0, size) ;
}
out.flush();
baos.close();
}
catch (MalformedURLException me)
{
System.out.println(me);
}
catch (IOException ioe)
{
System.out.println(ioe);
}
But now speed is very slow as compared to first code, How to improve
performance of code.
Thanks
--
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