Main Page Cookbook/Overview ImageMeister the jcprops file Licensing Binary Installation & Configuration [ Win · Mac · Nix ] Changes Public API Source Code Main Page Java [ Common · Win · Mac · Nix ] Native Code [ Common · Win · Mac · Nix ] Manifest Native Code Overviews [ Common · Win · Mac · Nix · Strings ] Macros [ General · Native Macros ] Walkthroughs [ Java only · Java and native ] Building [ Win · Mac · Nix ] Distribution Issues

    All Packages  This Package  Class Hierarchy  Class Search  Index

Class com.jconfig.FileType

    java.lang.Object
       |
       +----com.jconfig.FileType

Summary

    public class  FileType
         extends java.lang.Object
    {
              // Fields 11
         public static final int CREATED_FROM_EXT;
         public static final int CREATED_FROM_FTAC;
         public static final int CREATED_FROM_MIME;
         private static final String copyrightString;
         private int createdFrom;
         private int maxExtensionsRequested;
         private int maxFinderInfosRequested;
         private FileExtension[] savedExtensions;
         private FinderInfo[] savedFileInfos;
         private FileExtension theExt;
         private FinderInfo theFinderInfo;

              // Constructors 2
         public FileType(FileExtension);
         public FileType(FinderInfo);

              // Methods 5
         public void flushCachedData();
         public FileExtension[] getExtensions(int);
         public FinderInfo[] getFinderInfos(int);
         public int getProvenance();
         public String toString();
    }

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.

Author:
  Copyright (c) 1997,1998,1999,2000 Samizdat Productions. All Rights Reserved.

Cross Reference

Returned By:
  AppFile.getFileTypes(), FileRegistryI.getFileType(), FileRegistryPlain.getFileType(), FileRegistry.getFileType(), AppFileMRJ.getFileTypes(), FileRegistryMRJ.getFileType(), MiscCreatorMRJ.getOpenableFileTypes(), AppFileCommandMgrNix.getFileTypes(), AppFileNix.getFileTypes(), FileRegistryNix.getFileType(), AppFileCommandMgrMSVM.getFileTypes(), AppFileMSVM.getFileTypes(), FileRegistryMSVM.getFileType()

Fields

### · copyrightString | Summary | Top

       private static final String copyrightString

### · createdFrom | Summary | Top

       private int createdFrom

### · maxExtensionsRequested | Summary | Top

       private int maxExtensionsRequested

### · maxFinderInfosRequested | Summary | Top

       private int maxFinderInfosRequested

### · theExt | Summary | Top

       private FileExtension theExt

### · savedExtensions | Summary | Top

       private FileExtension[] savedExtensions

### · theFinderInfo | Summary | Top

       private FinderInfo theFinderInfo

### · savedFileInfos | Summary | Top

       private FinderInfo[] savedFileInfos

### · CREATED_FROM_EXT | Summary | Top

       public static final int CREATED_FROM_EXT

> See the getProvenance() method.

### · CREATED_FROM_FTAC | Summary | Top

       public static final int CREATED_FROM_FTAC

> See the getProvenance() method.

### · CREATED_FROM_MIME | Summary | Top

       public static final int CREATED_FROM_MIME

> See the getProvenance() method.

Constructors

### · FileType | Summary | Top

       public FileType(FileExtension ext)

> Initialize from a FileExtension object.

### · FileType | Summary | Top

       public FileType(FinderInfo finfo)

> Initialize from a FileType object.

Methods

### · getExtensions | Summary | Top

       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 | Summary | Top

       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 | Summary | Top

       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 | Summary | Top

       public int getProvenance()

> Returns how this object was created, one of the following three values: CREATED_FROM_EXT, CREATED_FROM_FTAC, or CREATED_FROM_MIME.

### · toString | Summary | Top

       public String toString()

> Overrides:
>   toString in class Object

    All Packages  This Package  Class Hierarchy  Class Search  Index

Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7