Answer:
Yes; the example program did this.
Raw Bytes
As far as the IO system and hard disk are concerned, the program sends a stream of bytes and they are stored on the disk, one after another. There is no concept (at the electronic level) of "int" or "double" or "char". Its all "bytes" to the electronics. The example program did this:
dataOut.writeInt( 0 ); dataOut.writeDouble( 12.45 );
A hex dump shows the 12 bytes. Remember that dumps such as this print two characters to show the pattern in one byte.
The six zeros at the beginning of the line mean the
the first byte shown is byte zero of the file.
The f's the end of the line show that some bit patterns
of the double could also be interpreted
as characters.
QUESTION 14:
Is it possible to tell just by looking at the bytes in a file what types the data are?