@Singleton @Named(value="PBufXmlParser") @Visibility(value=LOCAL) public class PBufParser extends Object implements XmlServiceParser
DEFAULT_PARSING_SERVICE, STREAM_PARSING_SERVICE
Constructor and Description |
---|
PBufParser() |
Modifier and Type | Method and Description |
---|---|
PreGenerationRequirement |
getPreGenerationRequirement()
This tells the system whether or not it needs to pregenerate all proxies
prior to parsing a document or if the proxies can be generated lazily
|
<T> void |
marshal(OutputStream outputStream,
XmlRootHandle<T> root,
Map<String,Object> options)
Marshalls this tree into the given stream.
|
<T> T |
parseRoot(Model rootModel,
InputStream input,
Unmarshaller.Listener listener,
Map<String,Object> options)
This method must return an instance of the given class as the root of
an XML graph
|
<T> T |
parseRoot(Model rootModel,
URI location,
Unmarshaller.Listener listener,
Map<String,Object> options)
This method must return an instance of the given class as the root of
an XML graph
|
String |
toString() |
public <T> T parseRoot(Model rootModel, URI location, Unmarshaller.Listener listener, Map<String,Object> options) throws Exception
XmlServiceParser
parseRoot
in interface XmlServiceParser
rootModel
- The Model object of the root to be parsedlocation
- The location of the file to parselistener
- A listener that must be called via the contract of Unmarshaller.Listeneroptions
- optional (possibly null) options from the callerException
public <T> T parseRoot(Model rootModel, InputStream input, Unmarshaller.Listener listener, Map<String,Object> options) throws Exception
XmlServiceParser
parseRoot
in interface XmlServiceParser
rootModel
- The Model object of the root to be parsedinput
- A non-null input stream. This stream will NOT be closed by this methodlistener
- A listener that must be called via the contract of Unmarshaller.Listeneroptions
- optional (possibly null) options from the callerException
public PreGenerationRequirement getPreGenerationRequirement()
XmlServiceParser
getPreGenerationRequirement
in interface XmlServiceParser
public <T> void marshal(OutputStream outputStream, XmlRootHandle<T> root, Map<String,Object> options) throws IOException
XmlServiceParser
marshal
in interface XmlServiceParser
outputStream
- A non-closed output stream. This method will
not close the output streamroot
- The root of the tree to marshalloptions
- optional (possibly null) options from the callerIOException
- On any exception that might happenCopyright © 2009–2023 Oracle Corporation. All rights reserved.