Binary file I/O Lab


Objective: Working with binary files


Write a Hex File Viewer that can display the contents of a file in hexadecimal notation. Start with this code. This example illustrates binary file i/o in Java. Your program will have the following features:

To test your program
: Use Notepad to save the characters ABC into a file. Use your binary file viewer to read the file. As dicussed in class, if your program is working correctly, it should display 41 42 43.

Use your program to read and display the contents of this file. Can you determine what was written to the file ?