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.io package to work with streams in other ways. There's also a package of classes called java.net that 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 ReadID3 application, 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 “Perfect Silence” by Scapegoat Wax off the album Swax.

Have I ...

Get SAMS Teach Yourself Programming with Java™ in 24 Hours, FOURTH EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.