Class XmlUtil.StaxHolder

java.lang.Object
opennlp.tools.util.XmlUtil.StaxHolder
Enclosing class:
XmlUtil

private static final class XmlUtil.StaxHolder extends Object
Holds the shared StAX factory.

XMLInputFactory is thread-safe once configured, and the lazy holder keeps StAX out of the static initialization of XmlUtil, so the DOM and SAX helpers keep working on a platform like Android without a StAX implementation.

  • Field Details

  • Constructor Details

    • StaxHolder

      private StaxHolder()
  • Method Details