title: Android out of memory error?
body: <p>I keep getting these errors while retreiving images here.</p>
  
  <pre><code>07-26 17:21:29.194: ERROR/AndroidRuntime(396): java.lang.RuntimeException: An error occured while executing doInBackground()
   07-26 17:21:29.194: ERROR/AndroidRuntime(396):     at android.os.AsyncTask$3.done(AsyncTask.java:200)
     07-26 17:21:29.194: ERROR/AndroidRuntime(396):     at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
      07-26 17:21:29.194: ERROR/AndroidRuntime(396):     at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
       07-26 17:21:29.194: ERROR/AndroidRuntime(396):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
        07-26 17:21:29.194: ERROR/AndroidRuntime(396):     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         07-26 17:21:29.194: ERROR/AndroidRuntime(396):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
       07-26 17:21:29.194: ERROR/AndroidRuntime(396):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
        07-26 17:21:29.194: ERROR/AndroidRuntime(396):     at java.lang.Thread.run(Thread.java:1019)
       07-26 17:21:29.194: ERROR/AndroidRuntime(396): Caused by: java.lang.OutOfMemoryError
  </code></pre>
  
  <p>It occurs here when i try to retreive the images with this code.</p>
  
  <p>public void getImages() throws IOException{</p>
  
  <pre><code>    DefaultHttpClient httpclient = new DefaultHttpClient();
  
      HttpGet httppost = new HttpGet("https://sites.google.com/site/theitrangers/images/webImages.txt");
      HttpResponse response;
  
          response = httpclient.execute(httppost);
  
  
              HttpEntity ht = response.getEntity();
  
              BufferedHttpEntity buf = new BufferedHttpEntity(ht);
  
              InputStream is = buf.getContent();
  
  
              BufferedReader r = new BufferedReader(new InputStreamReader(is));
  
              StringBuilder total = new StringBuilder();
              String line;
              while ((line = r.readLine()) != null) {
                  total.append(line + "\n");
  
                imageUrl = total.toString();
                Log.v("getImage1", "Retreived image");
              }
       }
  </code></pre>