public class DefaultMIMEService extends AbstractFreedesktopService<MIMEEntry> implements MIMEService
bases, basesList| Constructor and Description |
|---|
DefaultMIMEService() |
DefaultMIMEService(GlobService globService,
AliasService aliasService,
MagicService magicService) |
| Modifier and Type | Method and Description |
|---|---|
AliasEntry |
getAliasEntryForAlias(String alias) |
String |
getDefaultExtension(MIMEEntry mimeEntry) |
MIMEEntry |
getEntryForMimeType(String mimeType) |
Collection<String> |
getExtensionsForMimeType(MIMEEntry mimeEntry) |
MIMEEntry |
getMimeTypeForFile(org.apache.commons.vfs2.FileObject file,
boolean useMagic) |
MIMEEntry |
getMimeTypeForPattern(String text) |
void |
removeBase(org.apache.commons.vfs2.FileObject base)
Remove a directory from the list that is is searched.
|
protected Collection<MIMEEntry> |
scanBase(org.apache.commons.vfs2.FileObject base) |
addBase, checkAndAddBase, checkAndAddBase, getAllEntities, getBases, getBasesInReverse, getEntities, getEntity, listDirsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddBase, getAllEntities, getBases, getEntities, getEntitypublic DefaultMIMEService()
public DefaultMIMEService(GlobService globService, AliasService aliasService, MagicService magicService)
public AliasEntry getAliasEntryForAlias(String alias)
getAliasEntryForAlias in interface MIMEServiceprotected Collection<MIMEEntry> scanBase(org.apache.commons.vfs2.FileObject base) throws IOException
scanBase in class AbstractFreedesktopService<MIMEEntry>IOExceptionpublic void removeBase(org.apache.commons.vfs2.FileObject base)
FreedesktopServiceremoveBase in interface FreedesktopService<MIMEEntry>removeBase in class AbstractFreedesktopService<MIMEEntry>base - base directory to remove from the list that is searched#addBase(File)public MIMEEntry getMimeTypeForFile(org.apache.commons.vfs2.FileObject file, boolean useMagic) throws IOException
getMimeTypeForFile in interface MIMEServiceIOExceptionpublic MIMEEntry getMimeTypeForPattern(String text) throws MagicRequiredException
getMimeTypeForPattern in interface MIMEServiceMagicRequiredExceptionpublic MIMEEntry getEntryForMimeType(String mimeType)
getEntryForMimeType in interface MIMEServicepublic String getDefaultExtension(MIMEEntry mimeEntry)
getDefaultExtension in interface MIMEServicepublic Collection<String> getExtensionsForMimeType(MIMEEntry mimeEntry)
getExtensionsForMimeType in interface MIMEServiceCopyright © 2016. All rights reserved.