|Modifier and Type||Method and Description|
Attempts to read XML file in chunks, passing each chunk to a SAX parser.
public static boolean readXMLChunk(BufferedReader reader, org.xml.sax.helpers.DefaultHandler m_handler, String chunkToken) throws ParserConfigurationException, SAXException, IOException
reader- the reader to read the XML from
m_handler- the SAX parser to feed the XML to
chunkToken- the token to read. The parser will locate the first instance of <chunkToken and will buffer all content, including the opening tag and up to and including the closing </chunkToken> tag. It will not currently handle <chunkToken/> instances, nor instances where more than one tag appears per line, or extra spaces appear between the angle brackets, slashes, and tag name of the tag we are searching for.
ParserConfigurationException- if there was a problem setting up the SAX parser.
SAXException- if there was a problem parsing the XML.
IOException- if there was a problem reading the XML from the reader.
Copyright © 2014 BioJava. All rights reserved.