Class FastSaxBuilder
- java.lang.Object
-
- org.jdom.input.SAXBuilder
-
- com.biomatters.geneious.publicapi.utilities.xml.FastSaxBuilder
-
public class FastSaxBuilder extends org.jdom.input.SAXBuilderA Sax Builder that is faster and uses less memory than the standard sax builder it extends (SAXBuilder). This sax builder uses no validation and discards all whitespace only text content fields that have no siblings (seeFastSaxHandler.setIgnoreBoundaryWhitespaceWithSiblings(boolean))
-
-
Constructor Summary
Constructors Constructor Description FastSaxBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jdom.Documentbuild(java.io.File file)org.jdom.Documentbuild(java.io.InputStream in)org.jdom.Documentbuild(java.io.InputStream in, long maximumExpectedSize)This builds a document from the supplied input stream.org.jdom.Documentbuild(java.io.Reader characterStream)org.jdom.Documentbuild(java.io.Reader in, long maximumExpectedSize)This builds a document from the supplied readerprotected voidconfigureParser(org.xml.sax.XMLReader parser, org.jdom.input.SAXHandler contentHandler)protected org.jdom.input.SAXHandlercreateContentHandler()static java.lang.StringgetTotalBuildTimes()Get a text description of the total time spent parsing XML by all FastSAXBuilders.-
Methods inherited from class org.jdom.input.SAXBuilder
build, build, build, build, build, configureContentHandler, createParser, getDriverClass, getDTDHandler, getEntityResolver, getErrorHandler, getExpandEntities, getFactory, getIgnoringBoundaryWhitespace, getIgnoringElementContentWhitespace, getReuseParser, getValidation, getXMLFilter, setDTDHandler, setEntityResolver, setErrorHandler, setExpandEntities, setFactory, setFeature, setIgnoringBoundaryWhitespace, setIgnoringElementContentWhitespace, setProperty, setReuseParser, setValidation, setXMLFilter
-
-
-
-
Method Detail
-
createContentHandler
protected org.jdom.input.SAXHandler createContentHandler()
- Overrides:
createContentHandlerin classorg.jdom.input.SAXBuilder
-
build
public org.jdom.Document build(java.io.InputStream in, long maximumExpectedSize) throws org.jdom.JDOMException, java.io.IOExceptionThis builds a document from the supplied input stream.- Parameters:
in- the input stream to build the xml frommaximumExpectedSize- the maximum size in bytes of the data that will be read from the input stream. This is used to allocate more appropriate buffer sizes and hence reduce memory usage and increase speed. This may be <=0 in which case some of the performance benefits of this class will be lost.- Returns:
- the document build.
- Throws:
org.jdom.JDOMExceptionjava.io.IOException
-
build
public org.jdom.Document build(java.io.Reader in, long maximumExpectedSize) throws org.jdom.JDOMException, java.io.IOExceptionThis builds a document from the supplied reader- Parameters:
in- the reader to build the xml frommaximumExpectedSize- the maximum size in bytes of the data that will be read from the input stream. This is used to allocate more appropriate buffer sizes and hence reduce memory usage and increase speed. This may be <=0 in which case some of the performance benefits of this class will be lost.- Returns:
- the document build.
- Throws:
org.jdom.JDOMExceptionjava.io.IOException
-
build
public org.jdom.Document build(java.io.InputStream in) throws org.jdom.JDOMException, java.io.IOException- Overrides:
buildin classorg.jdom.input.SAXBuilder- Throws:
org.jdom.JDOMExceptionjava.io.IOException
-
build
public org.jdom.Document build(java.io.Reader characterStream) throws org.jdom.JDOMException, java.io.IOException- Overrides:
buildin classorg.jdom.input.SAXBuilder- Throws:
org.jdom.JDOMExceptionjava.io.IOException
-
build
public org.jdom.Document build(java.io.File file) throws org.jdom.JDOMException, java.io.IOException- Overrides:
buildin classorg.jdom.input.SAXBuilder- Throws:
org.jdom.JDOMExceptionjava.io.IOException
-
getTotalBuildTimes
public static java.lang.String getTotalBuildTimes()
Get a text description of the total time spent parsing XML by all FastSAXBuilders.- Returns:
- a text description of the total time spent parsing XML by all FastSAXBuilders.
-
configureParser
protected void configureParser(org.xml.sax.XMLReader parser, org.jdom.input.SAXHandler contentHandler)- Overrides:
configureParserin classorg.jdom.input.SAXBuilder
-
-