Package org.camunda.spin.spi
Interface DataFormatReader
- All Known Implementing Classes:
- DomXmlDataFormatReader,- JacksonJsonDataFormatReader,- TextBasedDataFormatReader
public interface DataFormatReader
Reads the internal representation of a 
Spin object from its serialized representation.- Author:
- Daniel Meyer, Sebastian Menski, Thorben Lindhauer
- 
Method Summary
- 
Method Details- 
canReadReturns true if this reader estimates to be able to consume the input data. Implementations may not read more thanreadLimitbytes from the supplied reader.- Parameters:
- reader- reader that can be read from to detect a data format
- readLimit- positive number that poses a restriction on how many characters an implementation may read. Reading beyond this limit may lead to incomplete input when the method- readInput(Reader)is invoked.
- Returns:
- true if this reader is able to consume the input
 
- 
readInputRead (or parse) a reader into this data format's input structure. For example, an Xml-Based data format may return an internal tree structure which can be used for traversing the xml tree.- Parameters:
- reader- a- Readerproviding the data source
- Returns:
- the read or parsed input
- Throws:
- SpinDataFormatException- in case the reader cannot read the input
 
 
-