com.atlassian.renderer.util
Class FileTypeUtil

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

public class FileTypeUtil
extends java.lang.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 java.lang.String getContentType(java.io.File file)
          This probably has an issue with files named with upper case suffixes, as fileTypeMap.getContentType("foo.PNG") doesn't work.
static java.lang.String getContentType(java.lang.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 java.lang.String getContentType(java.lang.String fileName)

getContentType

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



Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.