Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javazoom.download.util
Class ConfigHandler

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          javazoom.download.util.ConfigHandler

All Implemented Interfaces:
  org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class ConfigHandler
extends org.xml.sax.helpers.DefaultHandler

This class implements a SAX2 handler to read Download4J XML configuration file.

Constructor Summary
`ConfigHandler(java.lang.String configpath)` Contructs the Config handler.

Method Summary
`void` | `endDocument()` SAX2 - endDocument.
`void` | `endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)` SAX2 - endElement
`Config` | `getConfig2()` Deprecated. return last Config read from XML.
`java.lang.String` | `getConfigPath()` Returns path to XML configuration file.
`java.lang.String` | `getLogFolder()` Gets log folder (Default is null)
`int` | `getLogLevel()` Gets log level (Default is 0).
`Repository` | `getRepository()` Return repository instance.
`void` | `startDocument()` SAX2 - startDocument.
`void` | `startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)` SAX2 - startElement.

Methods inherited from class org.xml.sax.helpers.DefaultHandler
`characters, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConfigHandler

    public ConfigHandler(java.lang.String configpath)

  Contructs the Config handler.

Parameters:
  `configpath` - path to XML configuration file.

Method Detail

### getConfig2

    public Config getConfig2()

  Deprecated. return last Config read from XML.

  Returns an instance of Config (Folder, ZIP or Database).

  Returns:
    generated Config.

### getRepository

    public Repository getRepository()

  Return repository instance.

  Returns:
    repository
  Since:
    1.3

### getConfigPath

    public java.lang.String getConfigPath()

  Returns path to XML configuration file.

  Returns:
    path to XML configuration file.

### getLogLevel

    public int getLogLevel()

  Gets log level (Default is 0).

  Returns:
    log level

### getLogFolder

    public java.lang.String getLogFolder()

  Gets log folder (Default is null)

  Returns:
    log folder.

### startDocument

    public void startDocument()

  SAX2 - startDocument.

### startElement

    public void startElement(java.lang.String uri,
                             java.lang.String localName,
                             java.lang.String qName,
                             org.xml.sax.Attributes attributes)

  SAX2 - startElement. Depending on folder, zip or database, it instanciates a Config object with FileInfo.

  Parameters:
    `uri` - NA
    `localName` - NA
    `qName` - XML tag name
    `attributes` - XML attributes

### endElement

    public void endElement(java.lang.String uri,
                           java.lang.String localName,
                           java.lang.String qName)

  SAX2 - endElement

  Parameters:
    `uri` - NA
    `localName` - NA
    `qName` - NA

### endDocument

    public void endDocument()

  SAX2 - endDocument.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD