I have a class TouchPoint which implements Serializable and because it contains Bitmap I wrote writeObject and readObject for that class:
private void writeO
Bitmap to byte[]:
Bitmap bmp; // your bitmap ByteArrayOutputStream stream = new ByteArrayOutputStream(); bmp.compress(Bitmap.CompressFormat.PNG, 100, stream); byte[] byteArray = stream.toByteArray();
Use Bufferedstreams for better performance.