Class GrokHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.owasp.dependencycheck.xml.assembly.GrokHandler
- All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
A handler to read Grok Assembly XML files.
- Author:
- Jeremy Long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) Collects the body text of the node being processed.voidendElement(String uri, String localName, String qName) Handles the end element event.voidstartElement(String uri, String localName, String qName, Attributes attributes) Handles the start element event.Methods inherited from class DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
Constructor Details
-
GrokHandler
public GrokHandler()
-
-
Method Details
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException Handles the start element event.- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Parameters:
uri- the uri of the element being processedlocalName- the local name of the element being processedqName- the qName of the element being processedattributes- the attributes of the element being processed- Throws:
SAXException- thrown if there is an exception processing
-
endElement
Handles the end element event.- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Parameters:
uri- the URI of the elementlocalName- the local name of the elementqName- the qName of the element- Throws:
SAXException- thrown if there is an exception processing
-
characters
Collects the body text of the node being processed.- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Parameters:
ch- the char array of textstart- the start position to copy text from in the char arraylength- the number of characters to copy from the char array- Throws:
SAXException- thrown if there is a parsing exception
-