FileOutputStream Tutorial

All of my I/O tutorials up until now have been dealing with Character Streams.
In this tutorial I will begin to introduce you to writing Byte data to a file.
The primary purpose of the FileOutputStream class is to write an output stream to a file.
This tutorial will demonstrate the write(int b) method to create a BMP image file from scratch.
By the end of this tutorial you will have created an 8x8 pixel striped-color bitmap image file.
The FileOutputStream class implements AutoClosable so we can use the try-with-resources type exception handling.
I will demonstrate the other overloaded versions of the write() method in my FileInputStream tutorial.

Open the command prompt (CMD - see the Getting Started ) and type in the following commands.