How can i convert File to Binary? I just need it for my project. I need to encrypt a file by its binaries.
With FileInputStream you can obtain the bytes from a File
From JavaDoc:
A FileInputStream obtains input bytes from a file in a file system. What files are available depends on the host environment.
FileInputStream is meant for reading streams of raw bytes such as image data. For reading streams of characters, consider using FileReader.