Holger's
Java API

com.antelmann.io
Interface XMLSerializable

All Known Implementing Classes:
AddressInfoImpl, ColorPath, DefaultMappingInfo, GeoPoint, GlobalAddress, ImmutableGlobalAddress, ImmutableSnailMailAddress, POP3Account.Config, RSSChannel, RSSItem, SnailMailAddress, XmlHelper

public interface XMLSerializable

A class that implements XMLSerializable can be written to an external target and later reinitialized using that target as a source. As the data is written in XML format, the exported data can be embedded in XML files that also contain other data.

Author:
Holger Antelmann
See Also:
XmlHelper, XMLEncoder, XMLDecoder

Method Summary
 void exportXML(OutputStream out)
          exports the entire object as XML and writes it to the given Writer, so that the object can be reconstructed with importXML(InputSource).
 void importXML(InputStream source)
          The object is fully reinitialized with the XML data contained in the given ImputSource, so that the object has the same state as it had during export.
 

Method Detail

exportXML

void exportXML(OutputStream out)
               throws IOException
exports the entire object as XML and writes it to the given Writer, so that the object can be reconstructed with importXML(InputSource). The given stream is neither flushed nor closed, so that other data may be effectively written to the InputSource after the method returned.

Throws:
IOException
See Also:
importXML(InputStream)

importXML

void importXML(InputStream source)
               throws SAXException,
                      IOException,
                      ClassCastException
The object is fully reinitialized with the XML data contained in the given ImputSource, so that the object has the same state as it had during export.

Throws:
SAXException
IOException
ClassCastException
See Also:
exportXML(OutputStream)


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads