Interface XMLStreamProcessor
- All Known Implementing Classes:
CollectionPopulatingXMLStreamProcessor
public interface XMLStreamProcessor
XMLStreamProcessor instances are provided to
StreamingXMLReader and will
receive all of the Fragments generated by the reader.-
Method Summary
Modifier and Type Method Description voidprocess(Fragment fragment)AcceptFragmentobjects from theStreamingXMLReader.voidsetBytesTotal(long bytesTotal)StreamingXMLReaderwill set the total number of bytes in the file before it begins parsing the file.
-
Method Details
-
process
AcceptFragmentobjects from theStreamingXMLReader. The reader will call this method as eachFragmentis extracted from the XML file- Parameters:
fragment- Wrapper object that contains aDocumentFragmentand anXMLByteLocationobject
-
setBytesTotal
void setBytesTotal(long bytesTotal)StreamingXMLReaderwill set the total number of bytes in the file before it begins parsing the file.You can use this along with the byte offsets provided in the
XMLByteLocationobjects to keep track of the parsing progress.- Parameters:
bytesTotal- Total bytes in the file being processed
-