Main Page
    Cookbook/Overview     ImageMeister     the jcprops file     Licensing
    Binary Installation & Configuration [ Win · Mac · Nix · OSX ]     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 · OSX ]     Distribution Issues

All Packages  This Package  Class Hierarchy  Class Search  Index

Class com.jconfig.mac.CocoaUtilsOSX
java.lang.Object
   |
   +----com.jconfig.mac.CocoaUtilsOSX

  Summary

class  CocoaUtilsOSX
     extends java.lang.Object
{
          // Fields 4
     private static final String KEY_BUNDLE_DOCUMENT_TYPES;
     private static final String KEY_BUNDLE_TYPE_EXTENSIONS;
     private static final String KEY_BUNDLE_TYPE_OSTYPES;
     private static final String copyrightString;

          // Constructors 1
     public CocoaUtilsOSX();

          // Methods 7
     private static void addFileTypeLists(NSDictionary, ArrayList, ArrayList);
     private static void addUniqueString(ArrayList, String);
     private static void buildFileTypeLists(String, ArrayList, ArrayList);
     public static FileType[] getFileTypes(String, int);
     private static FileType[] getFileTypes_inner(String, int);
     public static void init();
     public static void main(String[]);

}

Utilities using Apple's CocoaJava framework.

Author:
Copyright (c) 1997-2002 Samizdat Productions. All Rights Reserved.




  Fields

· copyrightString

Summary  |  Top

   private static final String copyrightString


· KEY_BUNDLE_DOCUMENT_TYPES

Summary  |  Top
   private static final String KEY_BUNDLE_DOCUMENT_TYPES


· KEY_BUNDLE_TYPE_EXTENSIONS

Summary  |  Top
   private static final String KEY_BUNDLE_TYPE_EXTENSIONS


· KEY_BUNDLE_TYPE_OSTYPES

Summary  |  Top
   private static final String KEY_BUNDLE_TYPE_OSTYPES


  Constructors

· CocoaUtilsOSX

Summary  |  Top

   public CocoaUtilsOSX() 

Default constructor



  Methods

· init

Summary  |  Top
   public static void init() 

This method must be called before using the other methods of this class. Calling mainBundle() causes the CocoaJava native code to be loaded.



· getFileTypes

Summary  |  Top
   public static FileType[] getFileTypes(String fullPath, 
                                         int creatorCode) 

Gets the FileTypes for the given app.

Uses CocoaJava methods to parse the app's Info.plist file. That file contains the file types with which the app is associated in its CFBundleTypeExtensions and CFBundleTypeOSTypes subkeys of the CFBundleDocumentTypes key.

Parameter Description
fullPath the full path to the app, in POSIX format
creatorCode the app's creator code

Returns:
an array of the file types. Some might have been created from extensions, some from OSTypes.


· getFileTypes_inner

Summary  |  Top
   private static FileType[] getFileTypes_inner(String fullPath, 
                                                int creatorCode) 


· buildFileTypeLists

Summary  |  Top
   private static void buildFileTypeLists(String fullPath, 
                                          ArrayList extensions, 
                                          ArrayList osTypes) 


· addFileTypeLists

Summary  |  Top
   private static void addFileTypeLists(NSDictionary dict, 
                                        ArrayList extensions, 
                                        ArrayList osTypes) 


· addUniqueString

Summary  |  Top
   private static void addUniqueString(ArrayList stringList, 
                                       String str) 


· main

Summary  |  Top
   public static void main(String[] args) 


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7