Package org.h2.security.auth

# Class H2AuthConfigXml

java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.h2.security.auth.H2AuthConfigXml

All Implemented Interfaces:
  `ContentHandler`, `DTDHandler`, `EntityResolver`, `ErrorHandler`

public class H2AuthConfigXml extends DefaultHandler
Parser of external authentication XML configuration file

## Constructor Summary

Constructors
Constructor
Description
`H2AuthConfigXml()`

## Method Summary

Modifier and Type
Method
Description
`void`
`endElement(String uri, String localName, String qName)`
`H2AuthConfig`
`getResult()`
Returns parsed authenticator configuration.
`static H2AuthConfig`
`parseFrom(InputStream inputStream)`
Parse the xml.
`static H2AuthConfig`
`parseFrom(URL url)`
Parse the xml.
`InputSource`
`resolveEntity(String publicId, String systemId)`
`void`
`startElement(String uri, String localName, String qName, Attributes attributes)`

### Methods inherited from class org.xml.sax.helpers.DefaultHandler

`characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.xml.sax.ContentHandler

`declaration`

## Constructor Details

### H2AuthConfigXml

public H2AuthConfigXml()

## Method Details

### startElement

public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException

Specified by:
  `startElement` in interface `ContentHandler`
Overrides:
  `startElement` in class `DefaultHandler`
Throws:
  `SAXException`

### endElement

public void endElement(String uri, String localName, String qName) throws SAXException

Specified by:
  `endElement` in interface `ContentHandler`
Overrides:
  `endElement` in class `DefaultHandler`
Throws:
  `SAXException`

### resolveEntity

public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException

Specified by:
  `resolveEntity` in interface `EntityResolver`
Overrides:
  `resolveEntity` in class `DefaultHandler`
Throws:
  `IOException`
  `SAXException`

### getResult

public H2AuthConfig getResult()
Returns parsed authenticator configuration.

Returns:
  Authenticator configuration.

### parseFrom

public static H2AuthConfig parseFrom(URL url) throws SAXException, IOException, ParserConfigurationException
Parse the xml.

Parameters:
  `url` - the source of the xml configuration.
Returns:
  Authenticator configuration.
Throws:
  `ParserConfigurationException` - if a parser cannot be created.
  `SAXException` - for SAX errors.
  `IOException` - If an I/O error occurs

### parseFrom

public static H2AuthConfig parseFrom(InputStream inputStream) throws SAXException, IOException, ParserConfigurationException
Parse the xml.

Parameters:
  `inputStream` - the source of the xml configuration.
Returns:
  Authenticator configuration.
Throws:
  `ParserConfigurationException` - if a parser cannot be created.
  `SAXException` - for SAX errors.
  `IOException` - If an I/O error occurs