Copyright 2012-02-25 Werner Randelshofer

ch.randelshofer.activation
Class MultiFileTypeMap

java.lang.Object
  extended by javax.activation.FileTypeMap
      extended by ch.randelshofer.activation.MultiFileTypeMap

public class MultiFileTypeMap
extends javax.activation.FileTypeMap

This file type map serves as a container for a collection of file type maps.

Version:
1.1 2002-02-12 Return application/octet-stream' for unknown data types.
1.0 1998-10-19
Author:
Werner Randelshofer, Hausmatt 10, CH-6405 Immensee, Switzerland.

Constructor Summary
MultiFileTypeMap()
           
 
Method Summary
 void add(javax.activation.FileTypeMap fileTypeMap)
           
 java.lang.String getContentType(java.io.File file)
          Return the type of the file object.
 java.lang.String getContentType(java.lang.String filename)
          Return the type of the file passed in.
 
Methods inherited from class javax.activation.FileTypeMap
getDefaultFileTypeMap, setDefaultFileTypeMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiFileTypeMap

public MultiFileTypeMap()
Method Detail

add

public void add(javax.activation.FileTypeMap fileTypeMap)

getContentType

public java.lang.String getContentType(java.io.File file)
Return the type of the file object. This method should always return a valid MIME type.

Specified by:
getContentType in class javax.activation.FileTypeMap
Parameters:
file - A file to be typed.
Returns:
The content type.

getContentType

public java.lang.String getContentType(java.lang.String filename)
Return the type of the file passed in. This method should always return a valid MIME type.

Specified by:
getContentType in class javax.activation.FileTypeMap
Parameters:
filename - The pathname of the file.
Returns:
The content type.

Copyright 2012-02-25 Werner Randelshofer