Interface XMLStreamProcessor
-
- All Known Implementing Classes:
CollectionPopulatingXMLStreamProcessor
public interface XMLStreamProcessorXMLStreamProcessor instances are provided toStreamingXMLReaderand will receive all of the Fragments generated by the reader.
-
-
Method Summary
All Methods Instance Methods Abstract Methods 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 Detail
-
process
void process(Fragment fragment)
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
-
-