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.

Variable Index

 o kCreatedFromExt
See the getProvenance() method.
 o kCreatedFromFTAC
See the getProvenance() method.
 o kCreatedFromMIME
See the getProvenance() method.

Constructor Index

 o FileType(FileExtension)
Initialize from a FileExtension object.
 o FileType(FinderInfo)
Initialize from a FileType object.

Method Index

 o flushCachedData()
Flush any cached data.
 o getExtensions(int)
Returns an array of FileExtension's corresponding to this FileType.
 o getFinderInfos(int)
Returns an array of FinderInfo's corresponding to this FileType.
 o getProvenance()
Returns how this object was created, one of the following three values: kCreatedFromExt, kCreatedFromFTAC, or kCreatedFromMIME.
 o toString()

Variables

 o kCreatedFromExt
  public final static int kCreatedFromExt
See the getProvenance() method.
 o kCreatedFromFTAC
  public final static int kCreatedFromFTAC
See the getProvenance() method.
 o kCreatedFromMIME
  public final static int kCreatedFromMIME
See the getProvenance() method.

Constructors

 o FileType
  public FileType(FileExtension ext)
Initialize from a FileExtension object.
 o FileType
  public FileType(FinderInfo finfo)
Initialize from a FileType object.

Methods

 o 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.
 o 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.
 o 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.
 o getProvenance
  public int getProvenance()
Returns how this object was created, one of the following three values: kCreatedFromExt, kCreatedFromFTAC, or kCreatedFromMIME.
 o toString
  public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index