| Constructor and Description |
|---|
XmlParser() |
| Modifier and Type | Method and Description |
|---|---|
ParserConfigurator |
configureParser(List<String> contextPath,
ClassLoader loader)
Creates an initial configurator object to be used to facilitate the marshaling and unmarshaling
processes.
|
void |
marshal(ParserConfigurator configurator,
Object obj,
Node node)
Converts an object graph into a Node,
|
void |
marshal(ParserConfigurator configurator,
Object obj,
OutputStream os)
Converts an object graph into the appropriate output format, writing it to the given stream.
|
<T> T |
unmarshal(ParserConfigurator configurator,
Class<? extends T> cls,
InputStream stream)
Converts a representation of an object graph into an instance of type
T. |
<T> T |
unmarshal(ParserConfigurator configurator,
Class<? extends T> cls,
Node node)
Converts a representation of an object graph into an instance of type
T. |
<T> T |
unmarshal(ParserConfigurator configurator,
Class<? extends T> cls,
Source source)
Converts a representation of an object graph into an instance of type
T. |
public ParserConfigurator configureParser(List<String> contextPath, ClassLoader loader)
ParserconfigureParser in interface ParsercontextPath - a list of paths that implementations can search in order to find binding
informationloader - the classloader for the parser to usecontextPath and loaderpublic void marshal(ParserConfigurator configurator, Object obj, OutputStream os) throws ParserException
Parsermarshal in interface Parserconfigurator - object containing the relevant configuration information needed to perform
the conversionobj - the root of the object graph to convertos - the output stream on which the converted object is writtenParserExceptionpublic void marshal(ParserConfigurator configurator, Object obj, Node node) throws ParserException
Parsermarshal in interface ParserParserExceptionpublic <T> T unmarshal(ParserConfigurator configurator, Class<? extends T> cls, InputStream stream) throws ParserException
ParserT.unmarshal in interface ParserT - expected return objectconfigurator - object containing the relevant configuration information needed to perform
the conversioncls - Class for the conversionstream - input stream which is read for the object dataT as read and converted from the streamParserExceptionpublic <T> T unmarshal(ParserConfigurator configurator, Class<? extends T> cls, Node node) throws ParserException
ParserT.unmarshal in interface ParserT as read and converted from the nodeParserExceptionpublic <T> T unmarshal(ParserConfigurator configurator, Class<? extends T> cls, Source source) throws ParserException
ParserT.unmarshal in interface ParserT as read and converted from the sourceParserExceptionThis work is licensed under a Creative Commons Attribution 4.0 International License.