public class BindingSelector extends Object
| Constructor and Description |
|---|
BindingSelector(String uri,
String name,
String[] versions,
String[] bindings)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
IUnmarshallingContext |
getContext()
Get initial unmarshalling context.
|
void |
marshalVersioned(Object obj,
String version)
Marshal according to supplied version.
|
void |
setIndent(int indent)
Set nesting indent spaces.
|
void |
setOutput(OutputStream outs,
String enc)
Set output stream and encoding.
|
void |
setOutput(Writer outw)
Set output writer.
|
Object |
unmarshalVersioned(Class clas)
Unmarshal according to document version.
|
public BindingSelector(String uri, String name, String[] versions, String[] bindings)
uri - version selection attribute URI (null if none)name - version selection attribute nameversions - array of version texts (first is default)bindings - array of binding names corresponding to versionspublic IUnmarshallingContext getContext()
unmarshalVersioned(java.lang.Class).public void setOutput(OutputStream outs, String enc)
outs - stream for document data outputenc - document output encoding, or null for defaultpublic void setOutput(Writer outw)
outw - writer for document data outputpublic void setIndent(int indent)
indent - number of spaces to indent per level, or disable
indentation if negativepublic void marshalVersioned(Object obj, String version) throws JiBXException
obj - root object to be marshalledversion - identifier for version to be used in marshallingJiBXException - if error in marshallingpublic Object unmarshalVersioned(Class clas) throws JiBXException
clas - expected class mapped to root element of document (used only
to look up the binding)JiBXException - if error in unmarshallingCopyright © 2005-2014 jibx.org. All Rights Reserved.