com.atlassian.renderer.util
Class FileTypeUtil

java.lang.Object
  extended by com.atlassian.renderer.util.FileTypeUtil

public class FileTypeUtil
extends Object

This class helps resolve properties about files. It expects there to be a mime.types file accessable in the classpath of the running application to function properly.


Constructor Summary
FileTypeUtil()
           
 
Method Summary
static String getContentType(File file)
          This probably has an issue with files named with upper case suffixes, as fileTypeMap.getContentType("foo.PNG") doesn't work.
static String getContentType(String fileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTypeUtil

public FileTypeUtil()
Method Detail

getContentType

public static String getContentType(String fileName)

getContentType

public static String getContentType(File file)
This probably has an issue with files named with upper case suffixes, as fileTypeMap.getContentType("foo.PNG") doesn't work.



Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.