In my android application. I got binary code from a jpeg image from the code as follows.
byte[] val = stream.toByteArray();
BigInteger bi = new BigInteger(val);
String s = bi.toString(2);
This string s prints the binary value of the image. My question is how to convert this binary format into a jpeg image??