O'Reilly logo

JavaBeans Unleashed by Rick Leinecker, Dr. Donald Doherty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Object Streams

Java uses object streams to save data to persistent storage media and restore data back from the media. A stream is a path of communication between a data source and its destination. The object sending data through the stream is the producer and the item receiving data is the consumer. The Java Virtual Machine (JVM) requires that an object reads or writes its own state. A Java bean must implement the Serializable or Externalizable interface from Java's java.io package for it to be serialized properly.

Using Java's Serializable Interface

Java beans implementing the Serializable interface from Java's java.io package can save or retrieve their state. The Serialization interface does not define any methods or data fields, it ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required