File to String Pattern for uploading to a server
I'm not familiar with Android at all, so just some generic Java notes:


I'd rename bm to bitmap. A little bit longer variable names are usually easier to read and maintain.
The constructor should validate its input parameters. Does it make sense to call it with null or empty string as path or a less than zero timestamp? If not, check it and throw a NullPointerException or an IllegalStateException. (Effective Java, Second Edition, Item 38: Check parameters for validity)
It is a bad idea to use printStackTrace() in Android exceptions.
I don't know if it differs from general Java or not but closing a ByteArrayOutputStream in Java has no effect. You might be able to omit it.