Cover Page by Gary Cornell, Cay S. Horstmann

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

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 ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required