Package org.apache.tika.sax
Class OfflineContentHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.tika.sax.ContentHandlerDecorator
org.apache.tika.sax.OfflineContentHandler
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
Content handler decorator that always returns an empty stream from the
resolveEntity(String, String)
method to prevent potential
network or other external resources from being accessed by an XML parser.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionresolveEntity
(String publicId, String systemId) Returns an empty stream.Methods inherited from class org.apache.tika.sax.ContentHandlerDecorator
characters, endDocument, endElement, endPrefixMapping, error, fatalError, handleException, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, toString, warning
Methods inherited from class org.xml.sax.helpers.DefaultHandler
notationDecl, unparsedEntityDecl
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
OfflineContentHandler
-
-
Method Details
-
resolveEntity
Returns an empty stream. This will make an XML parser silently ignore any external entities.- Specified by:
resolveEntity
in interfaceEntityResolver
- Overrides:
resolveEntity
in classDefaultHandler
-