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.ListgetExtensions(StringmimeType)
public staticGet the last most extension from a file path.StringgetFileExtension(Stringpath)
This can handle both UNIX and Win32 paths.
public staticGet the major portion of a mime type.StringgetMajor(StringmimeType)
public staticGet the mime type for the specified extension.StringgetMimeType(Stringext)
public staticGet the mime type for the specified file.StringgetMimeType(Filefile)
Related Topics
MimeTypeHelper.getMimeTypeFromPath(String)
public staticGet the mime type for the specified file path.StringgetMimeTypeFromPath(Stringpath)
Related Topics
MimeTypeHelper.getMimeType(String)
MimeTypeHelper.getFileExtension(String)
public staticGet the minor portion of a mime type.StringgetMinor(StringmimeType)
public staticSplit a string on a separator and return it as a list.Listsplit(Stringstr,Stringseps)
public static void splitInto(Split a string on a separator into the given listStringstr,Stringseps,Listl)