|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.beasys.commerce.util.MimeTypeHelper
MimeTypeHelper
@Deprecated public class MimeTypeHelper
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.
Constructor Summary | |
---|---|
MimeTypeHelper()
Deprecated See BEA Commerce product offering |
Method Summary | |
---|---|
static List |
getExtensions(String mimeType)
Deprecated See BEA Commerce product offering |
static String |
getFileExtension(String path)
Deprecated See BEA Commerce product offering |
static String |
getMajor(String mimeType)
Deprecated See BEA Commerce product offering |
static String |
getMimeType(File file)
Deprecated See BEA Commerce product offering |
static String |
getMimeType(String ext)
Deprecated See BEA Commerce product offering |
static String |
getMimeTypeFromPath(String path)
Deprecated See BEA Commerce product offering |
static String |
getMinor(String mimeType)
Deprecated See BEA Commerce product offering |
static List |
split(String str,
String seps)
Deprecated See BEA Commerce product offering |
static void |
splitInto(String str,
String seps,
List l)
Deprecated See BEA Commerce product offering |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MimeTypeHelper()
Method Detail |
---|
public static List getExtensions(String mimeType)
mimeType
- the mime type.
public static String getMimeType(String ext)
ext
- the file extensions (no . included).
public static String getMimeTypeFromPath(String path)
path
- the file path.
getMimeType(java.lang.String)
,
getFileExtension(java.lang.String)
public static String getFileExtension(String path)
This can handle both UNIX and Win32 paths.
path
- the file path.
public static String getMimeType(File file)
file
- the file.
getMimeTypeFromPath(java.lang.String)
public static String getMajor(String mimeType)
mimeType
- the mime type.
public static String getMinor(String mimeType)
mimeType
- the mime type.
public static List split(String str, String seps)
str
- the string to split.seps
- the separators (as per StringTokenizer).
public static void splitInto(String str, String seps, List l)
str
- the string to split.seps
- the separators (as per StringTokenizer).l
- the list.
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |