XMLDecoder

Class XMLDecoder

All Implemented Interfaces:
AutoCloseable
public class XMLDecoder
extends Object
implements AutoCloseable

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