public class XmlDOMReader extends Object implements BinderReader
| Modifier and Type | Field and Description |
|---|---|
protected BinderOptions |
format |
protected static ThreadLocal<DocumentBuilder> |
localBuilder |
| Constructor and Description |
|---|
XmlDOMReader() |
XmlDOMReader(BinderOptions options) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
buildObjectFromType(Class<?> type) |
<T> T |
read(Class<? extends T> type,
InputStream source)
Read or deserialize an input stream into a POJO of specific type.
|
<T> T |
read(Class<? extends T> type,
Reader source)
Read or deserialize a character stream reader into a POJO of specific type.
|
<T> T |
read(Class<? extends T> type,
String source)
Read or deserialize an string into a POJO of specific type.
|
protected void |
read(Object obj,
Element element) |
protected Object |
readSubElement(Element element,
Class<?> type) |
protected <T> void |
validate(Class<? extends T> type,
InputStream source) |
protected BinderOptions format
protected static final ThreadLocal<DocumentBuilder> localBuilder
public XmlDOMReader()
public XmlDOMReader(BinderOptions options)
public <T> T read(Class<? extends T> type, InputStream source) throws ReaderException, MappingException
BinderReaderread in interface BinderReadertype - target typesource - an input streamReaderException - if reads failMappingExceptionpublic <T> T read(Class<? extends T> type, String source) throws ReaderException, MappingException
BinderReaderread in interface BinderReadertype - target typesource - a stringReaderException - if reads failMappingExceptionpublic <T> T read(Class<? extends T> type, Reader source) throws ReaderException, MappingException
BinderReaderread in interface BinderReadertype - target typesource - a character stream readerReaderException - if reads failMappingExceptionprotected <T> void validate(Class<? extends T> type, InputStream source) throws ReaderException
ReaderExceptionprotected Object readSubElement(Element element, Class<?> type) throws Exception
ExceptionCopyright © 2016. All rights reserved.