I am using Mono for Android, I would like to save the bitmap to an array of bytes so I can save it to the database.
Searching here I found the following code snippet:
ByteArrayOutputStream bos = new ByteArrayOutputStream(); bitmap.compress(CompressFormat.PNG, 0, bos); byte[] bitmapdata = bos.toByteArray();
But class "ByteArrayOutputStream" was not found.
Can someone tell me which import space to import that this class contains, or any other way to solve this problem.
Thank you for your time.
source share