O'Reilly logo

Core Java® Volume II—Advanced Features, Ninth Edition by Gary Cornell, Cay S. Horstmann

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

8.9.1. Using JavaBeans Persistence for Arbitrary Data

JavaBeans persistence is not limited to the storage of Swing components. You can use the mechanism to store any collection of objects, provided you follow a few simple rules. In the following sections, you will learn how you can use JavaBeans persistence as a long-term storage format for your own data.

The XMLEncoder has built-in support for the following types:

null

• All primitive types and their wrappers

• Enumerations (since Java SE 6)

String

• Arrays

• Collections and maps

• The reflection types Class, Field, Method, and Proxy

• The AWT types Color, Cursor, Dimension, Font, Insets, Point, Rectangle, and ImageIcon

• AWT and Swing components, borders, layout managers, and models

• Event ...

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