|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface XmlHandler
The XmlHandler interface defines methods for serializing objects
to a particular OutputStream, as well as reading XML files and
returning objects equivalent to their structure.
| Method Summary | |
|---|---|
void |
beanToXml(Object bean,
OutputStream destiny,
String context)
Serializes the content of a given object to an OutputStream. |
Object |
xmlToBean(InputStream source,
String context)
Retrieves the content of a given XML file as an Object. |
| Method Detail |
|---|
void beanToXml(Object bean,
OutputStream destiny,
String context)
throws XmlHandlerException
OutputStream.
bean - The object to be serialized in form of XML file.destiny - The destination (as OutputStream) of the XML file
to be serialized.context - The context of the XML file. For instance, for the
JaxbXmlHandler implementation, the context is the
package where the objects that represent the XML structure are
located.
XmlHandlerException - If any problem occur when trying to serialize the object.
Object xmlToBean(InputStream source,
String context)
throws XmlHandlerException
Object.
source - The XML file to be read, as InputStream.context - The context of the XML file. For instance, for the
JaxbXmlHandler implementation, the context is the
package where the objects that represent the XML structure are
located.
Object.
XmlHandlerException - If any problem occur when trying to read the XML file and
transform it to an Object representation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||