|
org.openide.filesystems 7.38.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openide.filesystems.MIMEResolver
public abstract class MIMEResolver
This class is intended as superclass for individual resolvers. All registered subclasses of MIMEResolver are looked up and asked one by one to resolve MIME type of passed FileObject. Resolving is finished right after a resolver is able to resolve the FileObject or if all registered resolvers returned null (not recognized).
Resolvers are registered if they have their record in the Lookup area. E.g. in form : org-some-package-JavaResolver.instance file.
MIME resolvers can also be registered in the Services/MIMEResolver
folder as *.xml
files obeying a certain format.
These will be interpreted before resolvers in lookup (in the order specified in that folder).
Nested Class Summary | |
---|---|
class |
MIMEResolver.UIHelpers
Internal support for implementors of MIME resolver UIs. |
Constructor Summary | |
---|---|
MIMEResolver()
Deprecated. Use MIMEResolver(String...) instead. Declaring MIME
types which can only be resolved by this resolver helps to speed up IDE. |
|
MIMEResolver(String... mimeTypes)
Creates a new MIMEResolver. |
Method Summary | |
---|---|
abstract String |
findMIMEType(FileObject fo)
Resolves FileObject and returns recognized MIME type |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MIMEResolver(String... mimeTypes)
mimeTypes
- an array of MIME types which can be resolved by this resolver.
It should contain all MIME types which findMIMEType(org.openide.filesystems.FileObject)
can return.
If something is missing, this resolver can be ignored, when searching for that
missing MIME type (see FileUtil.getMIMEType(FileObject, String...)
).@Deprecated public MIMEResolver()
MIMEResolver(String...)
instead. Declaring MIME
types which can only be resolved by this resolver helps to speed up IDE.
Method Detail |
---|
public abstract String findMIMEType(FileObject fo)
fo
- is FileObject which should be resolved (This FileObject is not
thread safe. Also this FileObject should not be cached for later use)
|
org.openide.filesystems 7.38.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |