I m trying to get/convert the value of Arraylist in byte[] below is my code
final ArrayList<Object> imglists = new ArrayList<Object>();
this is my arraylist of Objects in this arraylist m storing the values of images in form of bytes
for (int i=0; i<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);
}
I m trying to get the specific value from arraylist and store that in byte[] this is what I was trying to do
byte[] value=imglists.get(2);
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)