title: Convert Arraylist<Object> value in to byte[]
body: <p>I m trying to get/convert the value of Arraylist in byte[] 
  below is my code</p>
  
  <pre><code>final ArrayList&lt;Object&gt; imglists = new ArrayList&lt;Object&gt;();
  </code></pre>
  
  <p>this is my arraylist of Objects in this arraylist m storing the values of images in form of bytes </p>
  
  <pre><code>for (int i=0; i&lt;mPlaylistVideos.size();i++) {
      holder.mThumbnailImage.buildDrawingCache();
      Bitmap bitmap= holder.mThumbnailImage.getDrawingCache();
      ByteArrayOutputStream bs = new ByteArrayOutputStream();
      bitmap.compress(Bitmap.CompressFormat.JPEG, 50, bs);
      byte[] rough = bs.toByteArray();
      imglists.add(i,rough);
  }
  </code></pre>
  
  <p>I m trying to get the  specific value from arraylist and store that in byte[]
  this is what I was trying to do </p>
  
  <pre><code>byte[] value=imglists.get(2);
  </code></pre>
  
  <p>I could not find any complete answer to convert Arraylist of Object into byte[] 
  I know Arraylist doesn't support primitive datatype (i-e byte)</p>