DEPRECATED Use com.bea.p13n.content.MimeTypeHelper
Object
Utility class to help with Mime Types.
This provides support for determining the MIME type based upon a file path/extension, and determining the extensions for a MIME type.
Upon load, this class will attempt to load in the "mime.types" in the same package as it (as a resource via getResource()). If that fails, an error will be thrown. The "mime.types" file should be of the standard Apache group format and provides information on most public mime types.
Object
MimeTypeHelper
Constructor Summary |
Method Summary |
public static |
|
public static |
|
public static | |
public static |
|
public static |
|
public static |
|
public static | |
public static | |
public static void |
Methods from class java.lang. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MimeTypeHelper()
Method Detail |
public staticGet the list of extensions for the given mime type.List
getExtensions(String
mimeType)
public staticGet the last most extension from a file path.String
getFileExtension(String
path)
This can handle both UNIX and Win32 paths.
public staticGet the major portion of a mime type.String
getMajor(String
mimeType)
public staticGet the mime type for the specified extension.String
getMimeType(String
ext)
public staticGet the mime type for the specified file.String
getMimeType(File
file)
Related Topics
MimeTypeHelper.getMimeTypeFromPath(String)
public staticGet the mime type for the specified file path.String
getMimeTypeFromPath(String
path)
Related Topics
MimeTypeHelper.getMimeType(String)
MimeTypeHelper.getFileExtension(String)
public staticGet the minor portion of a mime type.String
getMinor(String
mimeType)
public staticSplit a string on a separator and return it as a list.List
split(String
str,String
seps)
public static void splitInto(Split a string on a separator into the given listString
str,String
seps,List
l)