ptg7068951
Summary 295
The program.propertiesfile now contains the following text:
Output▼
#Properties settings
#Tue May 12 22:51:26 EDT 2009
runtime=Tue May 12 22\:51\:26 EDT 2009
score=12550
level=5
username=max
The backslash character’s () formatting, which differs from the output of
the application, ensures the propertiesfile is stored properly.
Summary
During this hour, you worked with input streams and output streams that
wrote bytes, the simplest way to represent data over a stream.
There are many more classes in the java.iopackage to work with streams
in other ways. There’s also a package of classes called java.netthat
enables you to read and write streams over an Internet connection.
Byte streams can be adapted to many uses because you can easily convert
bytes into other data types, such as integers, characters, and strings.
The first project of this hour, the ID3Readerapplication, read bytes from a
stream and converted them into a string because it was easier to read the
ID3 data in this format from a song such as “Come On and Gettit” by
Marian Black off the album Eccentric Soul.
Have I mentioned yet that you should buy the song?
FIGURE 20.3
Running the Configurator
application.