- Forum posts: 10
Apr 4, 2012, 6:07:07 AM via Website
Apr 4, 2012 6:07:07 AM via Website
2
3writer = new BufferedWriter(new OutputStreamWriter(connection.getOutputStream()));
4writer.write("email_addr=" + URLEncoder.encode(email_addr, "UTF-8") + "&" + "passwd=" +
5 URLEncoder.encode(password, "UTF-8") + "&" +
6 "cmd=" + tmp + "&" + "parms=" + URLEncoder.encode(parms, "UTF-8"));
7writer.close();
and the read the response as follows:
2tmp = rdr.readLine();
Everything works fine as long as the data coming back is less than around 5 MB. Then I get an error on readLine():
04-02 16:51:34.232: E/dalvikvm-heap(3907): Out of memory on a 10309582-byte allocation
Anyone have any ideas on why this is happening and how to fix it?
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.