pl.psnc.dl.ege.webapp.config
Class MimeExtensionProvider

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by pl.psnc.dl.ege.webapp.config.MimeExtensionProvider
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public final class MimeExtensionProvider
extends org.xml.sax.helpers.DefaultHandler

Provides mime to file extension map. Map parameters are read from .xml configuration file.

Author:
mariuszs

Method Summary
 java.lang.String getFileExtension(java.lang.String mimeType)
           
static MimeExtensionProvider getInstance(java.lang.String configPath)
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes attributes)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static MimeExtensionProvider getInstance(java.lang.String configPath)

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String name,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

getFileExtension

public java.lang.String getFileExtension(java.lang.String mimeType)


Copyright © 2010. All Rights Reserved.