How can we convert an image into binary file in java?