ObjectInput/OutputStreams can be used to read and write objects. These are filter streams that can completely replace data stream because it has all the functions available in the data streams like reading and writing integer, double, UTF etc. Apart from those, this also has functionality to read and write objects.
However, please note that only Serializable objects (Classes or super classes of which implements Serializable interface) can be read or written to file.
Exercise: Write a program that uses object streams to read and write objects.
John 85.5 Sat Dec 22 13:56:00 IST 2012
Download Code: Object Stream Demo
No comments:
Post a Comment