Class COM.tolstoy.jconfig.FileType
All Packages Class Hierarchy This Package Previous Next Index
Class COM.tolstoy.jconfig.FileType
java.lang.Object
|
+----COM.tolstoy.jconfig.FileType
- public class FileType
- extends Object
Represents a cross-platform file type. Instances are created from either a FileExtension or
FinderInfo object, and arrays of corresponding FinderInfo or FileExtension objects can be
obtained.
-
kCreatedFromExt
- See the getProvenance() method.
-
kCreatedFromFTAC
- See the getProvenance() method.
-
kCreatedFromMIME
- See the getProvenance() method.
-
FileType(FileExtension)
- Initialize from a FileExtension object.
-
FileType(FinderInfo)
- Initialize from a FileType object.
-
flushCachedData()
- Flush any cached data.
-
getExtensions(int)
- Returns an array of FileExtension's corresponding to this FileType.
-
getFinderInfos(int)
- Returns an array of FinderInfo's corresponding to this FileType.
-
getProvenance()
- Returns how this object was created, one of the following three values: kCreatedFromExt,
kCreatedFromFTAC, or kCreatedFromMIME.
-
toString()
-
kCreatedFromExt
public final static int kCreatedFromExt
- See the getProvenance() method.
kCreatedFromFTAC
public final static int kCreatedFromFTAC
- See the getProvenance() method.
kCreatedFromMIME
public final static int kCreatedFromMIME
- See the getProvenance() method.
FileType
public FileType(FileExtension ext)
- Initialize from a FileExtension object.
FileType
public FileType(FinderInfo finfo)
- Initialize from a FileType object.
getExtensions
public FileExtension[] getExtensions(int maxToReturn)
- Returns an array of FileExtension's corresponding to this FileType.
If this object was created from an extension, an array with length 1 is returned containing
the extension, and the 'maxToReturn' argument is ignored.
Otherwise, an array is returned containing FinderInfo objects which
correspond to the extension used to initialize this object. The
'maxToReturn' argument is used a hint; the actual array size may be larger
or smaller than this. This method may return null if no matches could be found.
getFinderInfos
public FinderInfo[] getFinderInfos(int maxToReturn)
- Returns an array of FinderInfo's corresponding to this FileType.
If this object was created from a FinderInfo object, an array with length 1 is returned
containing that object, and the 'maxToReturn' argument is ignored.
Otherwise, an array is returned containing FileExtension objects which
correspond to the FinderInfo object used to initialize this object. The
'maxToReturn' argument is used a hint; the actual array size may be larger
or smaller than this. This method may return null if no matches could be found.
flushCachedData
public void flushCachedData()
- Flush any cached data. This method can be used after, for instance, a new application has
been installed on the user's system.
getProvenance
public int getProvenance()
- Returns how this object was created, one of the following three values: kCreatedFromExt,
kCreatedFromFTAC, or kCreatedFromMIME.
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index