|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.activation.FileTypeMap com.ibm.portal.resolver.data.FileTypeMap
public abstract class FileTypeMap
Extension to the standard file type map that determines the mime type based on the content
Constructor Summary | |
---|---|
FileTypeMap()
|
Method Summary | |
---|---|
abstract java.lang.String |
canonicalize(java.lang.String contentType)
Canonicalizes the given content type by finding the official IANA mime type for mime type aliases. |
abstract java.lang.String |
getContentType(byte[] data)
Tries to determine the content type from the data array. |
abstract java.lang.String |
getContentType(byte[] data,
int off,
int len)
Tries to determine the content type from the data array. |
abstract java.lang.String |
getExtension(java.lang.String contentType)
Returns the file extension for the given content type |
Methods inherited from class javax.activation.FileTypeMap |
---|
getContentType, getContentType, getDefaultFileTypeMap, setDefaultFileTypeMap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileTypeMap()
Method Detail |
---|
public abstract java.lang.String getExtension(java.lang.String contentType)
contentType
- the content type
public abstract java.lang.String canonicalize(java.lang.String contentType)
application/x-zip-compressed
would e.g. be mapped to the
official content type application/zip
. If no alias can be
found the method returns the input.
contentType
- the content type that it potentially an alias, not
null
null
public abstract java.lang.String getContentType(byte[] data)
application/octet-stream
as a fallback.
data
- the data array, not null
null
public abstract java.lang.String getContentType(byte[] data, int off, int len)
application/octet-stream
as a fallback.
data
- the data array, not null
off
- index to the first valid byte in the bufferlen
- length of the data sequence
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |