org.openide.filesystems 8.5.1

org.openide.filesystems
Annotation Type MIMEResolver.ExtensionRegistration


@Retention(value=SOURCE)
public static @interface MIMEResolver.ExtensionRegistration

Often a mime type can be deduced just by looking at a file extension. If that is your case, this annotation is for you. It associates extension(s) with provided mime type.

If this kind of registration seems to trivial you can try MIMEResolver.NamespaceRegistration or MIMEResolver.Registration.

Since:
7.58

Required Element Summary
 String displayName
          Display name to present this type of objects to the user.
 String[] extension
          One or few extensions that should be recognized as given mimeType().
 String mimeType
          Mime type to be assigned to files with extension().
 
Optional Element Summary
 int position
          In case ordering of mime resolvers is important, one can specify it by defining their position.
 String[] showInFileChooser
          Show file filters for this MIME type.
 

Element Detail

displayName

public abstract String displayName
Display name to present this type of objects to the user.


mimeType

public abstract String mimeType
Mime type to be assigned to files with extension().


extension

public abstract String[] extension
One or few extensions that should be recognized as given mimeType().

position

public abstract int position
In case ordering of mime resolvers is important, one can specify it by defining their position.

Default:
2147483647

showInFileChooser

public abstract String[] showInFileChooser
Show file filters for this MIME type. Set localized names of file filters that should contain files resolved by this resolver.

Since:
8.1
See Also:
FileChooserBuilder.addDefaultFileFilters()
Default:
{}

org.openide.filesystems 8.5.1

Built on June 6 2013.  |  Portions Copyright 1997-2013 Oracle. All rights reserved.