If you're referring to accessing the ACTUAL BINARY form then read in the file and convert every byte to a binary representation...
EDIT:
Here's some code to convert a byte into a string with the bits:
String getBits(byte b)
{
String result = "";
for(int i = 0; i < 8; i++)
result += (b & (1 << i)) == 0 ? "0" : "1";
return result;
}
If you're referring to accessing the bytes in the file then simply use the following code (you can use this for the first case as well):
File file = new File("filename.bin");
byte[] fileData = new byte[file.length()];
FileInputStream in = new FileInputStream(file);
in.read(fileData):
in.close();
// now fileData contains the bytes of the file
To use these two pieces of code you can now loop over every byte and create a String object (8X larger than the original file size!!) with the bits:
String content = "";
for(byte b : fileData)
content += getBits(b);
// content now contains your bits.