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 MimeHandler

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

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

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

This class implements a SAX2 handler to read Download4J XML mime types.

Constructor Summary
`MimeHandler()` Constructs a MimeHandler.

Method Summary
`void` | `characters(char[] c, int p1, int p2)` SAX2 - characters callback.
`void` | `endDocument()` SAX2 - endDocument callback.
`void` | `endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)` SAX2 - endElement callback.
`java.util.Properties` | `getMimes()` Returns Mime types.
`void` | `startDocument()` SAX2 - startDocument callback.
`void` | `startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)` SAX2 - startElement callback.

Methods inherited from class org.xml.sax.helpers.DefaultHandler
`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

### MimeHandler

    public MimeHandler()

  Constructs a MimeHandler.

Method Detail

### getMimes

    public java.util.Properties getMimes()

  Returns Mime types.

  Returns:
    Properties : [extension] [mime-type]

### startDocument

    public void startDocument()

  SAX2 - startDocument callback.

### startElement

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

  SAX2 - startElement callback.

  Parameters:
    `uri` - N/A
    `localName` - N/A
    `qName` - XML tag name.
    `attributes` - XML tag attributes.

### characters

    public void characters(char[] c,
                           int p1,
                           int p2)

  SAX2 - characters callback. It reads XML element tag content.

  Parameters:
    `c` - char array macthing to XML element.
    `p1` - start index
    `p2` - end index

### endElement

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

  SAX2 - endElement callback. Each property (key, value) is instancied here.

  Parameters:
    `uri` - N/A
    `localName` - N/A
    `qName` - N/A

### endDocument

    public void endDocument()

  SAX2 - endDocument callback.

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