org.exist.util
Class MimeTable

java.lang.Object
  extended byorg.exist.util.MimeTable

public class MimeTable
extends java.lang.Object

Global table of mime types. This singleton class maintains a list of mime types known to the system. It is used to look up the mime type for a specific file extension and to check if a file is an XML or binary resource. The mime type table is read from a file "mime-types.xml", which should reside in the directory identified in the exist home directory. If no such file is found, the class tries to load the default map from the org.exist.util package via the class loader.

Author:
wolf

Constructor Summary
MimeTable()
           
 
Method Summary
 MimeType getContentType(java.lang.String mimeType)
           
 MimeType getContentTypeFor(java.lang.String fileName)
           
static MimeTable getInstance()
          Returns the singleton.
 java.lang.String getSrc()
          Inform from where a mime-table is loaded
 boolean isXMLContent(java.lang.String fileName)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MimeTable

public MimeTable()
Method Detail

getInstance

public static MimeTable getInstance()
Returns the singleton.

Returns:

getSrc

public java.lang.String getSrc()
Inform from where a mime-table is loaded

Returns:

getContentTypeFor

public MimeType getContentTypeFor(java.lang.String fileName)

getContentType

public MimeType getContentType(java.lang.String mimeType)

isXMLContent

public boolean isXMLContent(java.lang.String fileName)

main

public static void main(java.lang.String[] args)


<oXygen/> XML Editor provides support for editing and debugging XQuery expressions against the eXist XML Database.