FileDocCategorySizeDatePackage
SerialDemoXML.javaAPI DocExample801Sun Feb 03 15:52:34 GMT 2002None

SerialDemoXML

public class SerialDemoXML extends SerialDemo
Show the XML serialization added to "java.beans.*" in JDK1.4. Subclass "SerialDemo" to get most of the infrastructure

Fields Summary
Constructors Summary
Methods Summary
public voiddump()
Display the data

		XMLDecoder is = new XMLDecoder(
			new BufferedInputStream(
				new FileInputStream(FILENAME)));
		System.out.println(is.writeObject());
		is.close();
	
public static voidmain(java.lang.String[] args)

		new SerialDemoXML().save();
		new SerialDemoXML().dump();
	
public voidwrite(java.lang.Object theGraph)
Save the data to disk.

		XMLEncoder os = new XMLEncoder(
			new BufferedOutputStream(
				new FileOutputStream(FILENAME)));
		os.writeObject(theGraph);
		os.close();