public class XMLDecoder
  Comment     Returned-by     Constructor-argument     Method-argument     Field-type     Type-bound     Links  

The XMLDecoder class is used to read XML documents created using the XMLEncoder and is used just like the ObjectInputStream. For example, one can use the following fragment to read the first object defined in an XML document written by the XMLEncoder class:

       XMLDecoder d = new XMLDecoder(
                          new BufferedInputStream(
                              new FileInputStream("Test.xml")));
       Object result = d.readObject();
       d.close();
 

For more information you might also want to check out Long Term Persistence of JavaBeans Components: XML Schema, an article in The Swing Connection.

implements AutoCloseable

See also:
XMLEncoder, java.io.ObjectInputStream

Since:  1.4