My Java Tips

Data streams support binary I/O of primitive data type values (boolean, char, byte, short, int, long, float, and double) as well as String values. All data streams implement either the DataInput interface or the DataOutput interface.
If you need to work with data that is not represented as bytes or characters then you can use Data Streams. These streams filter an existing byte stream so that each primitive data types can be read from or written to the stream directly.