title: loading bitmap to array
body: <p>I need a bitmap ARRAY ready to be used dynamically.
  what i did is.</p>
  
  <p>on Activity i put</p>
  
  <pre><code>public static Bitmap[] bitmapArray;
  
  bitmapArray = new Bitmap[10];
  </code></pre>
  
  <p>then to use with a timer i do</p>
  
  <pre><code>public static Bitmap loadBitmap(String url) {
      Bitmap bitmap = null;
      InputStream in = null;
      BufferedOutputStream out = null;
  
      try {
          in = new BufferedInputStream(new URL(url).openStream(),
                  IO_BUFFER_SIZE);
  
          final ByteArrayOutputStream dataStream = new ByteArrayOutputStream();
          out = new BufferedOutputStream(dataStream, IO_BUFFER_SIZE);
          copy(in, out);
          out.flush();
  
          final byte[] data = dataStream.toByteArray();
          BitmapFactory.Options options = new BitmapFactory.Options();
          // options.outHeight=50;
          // options.outWidth=50;
          // options.inScaled=true; //inSampleSize = 1;
          // options.inSampleSize=3;
          bitmap = BitmapFactory.decodeByteArray(data, 0, data.length,
                  options);
      } catch (IOException e) {
          e.printStackTrace();
      } finally {
          closeStream(in);
          closeStream(out);
      }
  
      return bitmap;
  }
  
  
  
  for i.........
  MyActivity.bitmapArray[i]= loadBitmap( url........
  </code></pre>
  
  <p>And this is the problem. if i have on the heap a block of 10 (Bitmap[10])
  bitmaps buffers i want it to stay fix!!Same memory location.
  but each timer iteration the program load the buffer to a DIFFERENT block location
  which very soon the memory is finished.
  any idea?
  P.S i need the above solution fixed since i need the bitmap buffer to be used fast.</p>