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.mac.AppUtilsMRJ
java.lang.Object
   |
   +----com.jconfig.mac.AppUtilsMRJ

  Summary

class  AppUtilsMRJ
     extends java.lang.Object
{
          // Fields 45
     static final int DATE_BKUP_OFFSET;
     static final int DATE_CRE_OFFSET;
     static final int DATE_MOD_OFFSET;
     static final int FI_ARRAYLEN;
     static final int FI_OFFS_ATTRIBUTES;
     static final int FI_OFFS_CRE;
     static final int FI_OFFS_FLAGS;
     static final int FI_OFFS_TYPE;
     private static final String copyrightString;
     static final int kCategoryAlias;
     static final int kCategoryDirectory;
     static final int kCategoryFile;
     static final int kCategoryUnknown;
     static final int kCategoryVolume;
     static final int kDateBundleArrayLen;
     static final int kFinderFlagsColorMask;
     static final int kForkSizesDataOffset;
     static final int kForkSizesLen;
     static final int kForkSizesRsrcOffset;
     static final int kGetProcessesNameLen;
     static final int kIterateBufferSize;
     static final int kIterateEntrySize;
     static final int kIterateFlagsOffset;
     static final int kIterateIsAlias;
     static final int kIterateIsDir;
     static final int kIterateIsFile;
     static final int kIterateIsHiddenMask;
     static final int kIterateMaxEntries;
     static final int kIterateNameSize;
     static final int kIterateTypeOffset;
     static final int kLaunchWithDocOpenDoc;
     static final int kLaunchWithDocPrintDoc;
     static final int kMonitorInfoNumInts;
     static final int kPNameLen;
     static final int kPSNHiOffset;
     static final int kPSNLen;
     static final int kPSNLoOffset;
     static final int kParIDOffset;
     static final int kRefPairLen;
     static final int kSendAppDocsOpenDoc;
     static final int kSendAppDocsPrintDoc;
     static final int kSetForkLengthDATA;
     static final int kSetForkLengthRSRC;
     private static final int kUnused;
     static final int kVRefOffset;

          // Constructors 1
     private AppUtilsMRJ();

          // Methods 111
     static int createAlias(int, int, byte[], String, int, int);
     static String createFullPathName(int, int, byte[]);
     static int createVolumeAlias(int, String, int, int);
     static int disposeIconSuite(int, int);
     static int fullPathToSpec(String, int[], byte[]);
     static int getAllMonitorInfo(int[], int, int[]);
     static int getContainer(int, int, byte[], int[], byte[]);
     static int getDiskFileFlags(int, int, byte[], int[]);
     static int getDiskFileReadFlagsMask(int, int, byte[], int[]);
     static int getDiskFileWriteFlagsMask(int, int, byte[], int[]);
     static int getDiskVolumeFlags(int, int[]);
     static int getDiskVolumeReadFlagsMask(int, int[]);
     static int getDiskVolumeWriteFlagsMask(int, int[]);
     static int getFTACIconSuite(int, int, int, int, int[]);
     static int getFileCategory(int, int, byte[], int[]);
     static int getFileDate(int, int, byte[], int[]);
     static int getFileIconSuite(int, int, byte[], int, int[]);
     static int getFinderInfo(int, int, byte[], int[]);
     static int getForkSizes(int, int, byte[], long[]);
     static int getMainMonitorInfo(int[]);
     static int getOpenableFileTypes(int, int, int[], int[]);
     static int getProcesses(int, int, int[], int[], int[], byte[], int[], int[], int[]);
     static int getRawResourceFork(int, int, int, byte[], byte[]);
     static int getVolumeCapacity(int, long[]);
     static int getVolumeDate(int, int[]);
     static int getVolumeFinderInfo(int, int[]);
     static int getVolumeFreeSpace(int, long[]);
     static int getVolumeIconSuite(int, int, int[]);
     static int getVolumeName(int, byte[]);
     static int getVolumes(int, int[], int[]);
     static int iterateContents(int, int, byte[], int[], int[], byte[], int, int);
     static int iterateVolumeContents(int, int[], int[], byte[], int, int);
     static int launchApp(int, int, byte[], int[], int);
     static int launchURL(String, int, String[]);
     static int launchWithDoc(int, int, int, byte[], String[], int[], int);
     static int moveApp(int[], int, int);
     private static native int nCreateAlias(int, int, byte[], String, int, int);
     private static native int nCreateFullPathName(int, int, byte[], String[]);
     private static native int nCreateVolumeAlias(int, String, int, int);
     private static native int nDisposeIconSuite(int, int);
     private static native int nFullPathToSpec(String, int[], byte[]);
     private static native int nGetAllMonitorInfo(int[], int, int[]);
     private static native int nGetContainer(int, int, byte[], int[], byte[]);
     private static native int nGetDFReadFlagsMask(int, int, byte[], int[]);
     private static native int nGetDFWriteFlagsMask(int, int, byte[], int[]);
     private static native int nGetDVReadFlagsMask(int, int[]);
     private static native int nGetDVWriteFlagsMask(int, int[]);
     private static native int nGetDiskFileFlags(int, int, byte[], int[]);
     private static native int nGetDiskVolumeFlags(int, int[]);
     private static native int nGetFTACIconSuite(int, int, int, int, int[]);
     private static native int nGetFileCategory(int, int, byte[], int[]);
     private static native int nGetFileDate(int, int, int, byte[], int[]);
     private static native int nGetFileIconSuite(int, int, byte[], int, int[]);
     private static native int nGetFinderInfo(int, int, byte[], int[]);
     private static native int nGetForkSizes(int, int, byte[], long[]);
     private static native int nGetMainMonitorInfo(int[]);
     private static native int nGetOpenableFileTypes(int, int, int[], int[]);
     private static native int nGetProcesses(int, int, int[], int[], int[], byte[], int[], int[], int[]);
     private static native int nGetRawResourceFork(int, int, int, byte[], byte[]);
     private static native int nGetVolumeCapacity(int, long[]);
     private static native int nGetVolumeDate(int, int, int[]);
     private static native int nGetVolumeFinderInfo(int, int[]);
     private static native int nGetVolumeFreeSpace(int, long[]);
     private static native int nGetVolumeIconSuite(int, int, int[]);
     private static native int nGetVolumeName(int, byte[]);
     private static native int nGetVolumes(int, int[], int[]);
     private static native int nIVC(int, int[], int[], byte[], int, int);
     private static native int nIterateContents(int, int, byte[], int[], int[], byte[], int, int);
     private static native int nLaunchApp(int, int, byte[], int[], int);
     private static native int nLaunchURLDirect(String, int, String[]);
     private static native int nLaunchWithDoc(int, int, int, byte[], String[], int[], int);
     private static native int nMoveApp(int[], int, int);
     private static native int nPlotIcon(int, int, int, int, int, int, int[]);
     private static native int nQuitApp(int[], int);
     private static native int nRenameFile(int, int, byte[], byte[], String);
     private static native int nRenameVolume(int, String);
     private static native int nResolveAlias(int, int, byte[], int[], byte[], int);
     private static native int nSendAppDocs(int, int[], String[], int);
     private static native int nSetColorCoding(int, int, byte[], int);
     private static native int nSetCreatorAndType(int, int, byte[], int[]);
     private static native int nSetDiskFileFlags(int, int, byte[], int, int);
     private static native int nSetDiskVolumeFlags(int, int, int);
     private static native int nSetFileDate(int, int, int, byte[], int[]);
     private static native int nSetForkLength(int, int, int, int, byte[], long);
     private static native int nSetRawResourceFork(int, int, int, byte[], byte[]);
     private static native int nSetVolumeColorCoding(int, int);
     private static native int nSetVolumeDate(int, int, int[]);
     private static native int nUpdateContainer(int, int, byte[]);
     private static native int nVerifyFile(int, int, byte[]);
     private static native int nVerifyPSN(int[]);
     private static native int nVerifyVolume(int);
     static int plotIcon(int, int, int, int, int, int, int[]);
     static int quitApp(int[], int);
     static int renameFile(int, int, byte[], byte[], String);
     static int renameVolume(int, String);
     static int resolveAlias(int, int, byte[], int[], byte[], int);
     static int sendAppDocs(int, int[], String[], int);
     static int setColorCoding(int, int, byte[], int);
     static int setCreatorAndType(int, int, byte[], int[]);
     static int setDiskFileFlags(int, int, byte[], int, int);
     static int setDiskVolumeFlags(int, int, int);
     static int setFileDate(int, int, byte[], int[]);
     static int setForkLength(int, int, int, int, byte[], long);
     static int setRawResourceFork(int, int, int, byte[], byte[]);
     static int setVolumeColorCoding(int, int);
     static int setVolumeDate(int, int[]);
     static void testLink();
     static int updateContainer(int, int, byte[]);
     static int verifyFile(int, int, byte[]);
     static int verifyPSN(int[]);
     static int verifyVolume(int);

}

Contains static methods which call native methods. Contains most of the Mac native code. Many of the methods of this file are simply wrappers around the private native methods. Almost all of these methods return an error code; 0 means success, other values indicate some form of error.

The term 'WANC' in the documentation means that that method is just a Wrapper Around Native Code.

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




  Fields

· copyrightString

Summary  |  Top

   private static final String copyrightString


· FI_ARRAYLEN

Summary  |  Top
   static final int FI_ARRAYLEN


· FI_OFFS_CRE

Summary  |  Top
   static final int FI_OFFS_CRE


· FI_OFFS_TYPE

Summary  |  Top
   static final int FI_OFFS_TYPE


· FI_OFFS_FLAGS

Summary  |  Top
   static final int FI_OFFS_FLAGS


· FI_OFFS_ATTRIBUTES

Summary  |  Top
   static final int FI_OFFS_ATTRIBUTES


· kLaunchWithDocOpenDoc

Summary  |  Top
   static final int kLaunchWithDocOpenDoc


· kLaunchWithDocPrintDoc

Summary  |  Top
   static final int kLaunchWithDocPrintDoc


· kSendAppDocsOpenDoc

Summary  |  Top
   static final int kSendAppDocsOpenDoc


· kSendAppDocsPrintDoc

Summary  |  Top
   static final int kSendAppDocsPrintDoc


· kCategoryVolume

Summary  |  Top
   static final int kCategoryVolume


· kCategoryDirectory

Summary  |  Top
   static final int kCategoryDirectory


· kCategoryFile

Summary  |  Top
   static final int kCategoryFile


· kCategoryAlias

Summary  |  Top
   static final int kCategoryAlias


· kCategoryUnknown

Summary  |  Top
   static final int kCategoryUnknown


· kPNameLen

Summary  |  Top
   static final int kPNameLen

The length of a Pascal string; for many methods which accept a writable byte array as an argument, the array must have at least this many elements.


· kPSNLen

Summary  |  Top
   static final int kPSNLen

The length of an array used to hold a ProcessSerialNumber


· kPSNLoOffset

Summary  |  Top
   static final int kPSNLoOffset

The offset of the low int of a ProcessSerialNumber


· kPSNHiOffset

Summary  |  Top
   static final int kPSNHiOffset

The offset of the high int of a ProcessSerialNumber


· kRefPairLen

Summary  |  Top
   static final int kRefPairLen

The length of an array used to hold a vRef and parID


· kVRefOffset

Summary  |  Top
   static final int kVRefOffset

The offset of the vRef in an array used to hold a vRef and parID


· kParIDOffset

Summary  |  Top
   static final int kParIDOffset

The offset of the parID in an array used to hold a vRef and parID


· kForkSizesLen

Summary  |  Top
   static final int kForkSizesLen

The length of an array used to hold the length of a file's data and resource forks.


· kForkSizesDataOffset

Summary  |  Top
   static final int kForkSizesDataOffset

The offset of the data fork size in an array used to hold the length of a file's data and resource forks.


· kForkSizesRsrcOffset

Summary  |  Top
   static final int kForkSizesRsrcOffset

The offset of the resource fork size in an array used to hold the length of a file's data and resource forks.


· kFinderFlagsColorMask

Summary  |  Top
   static final int kFinderFlagsColorMask


· kIterateEntrySize

Summary  |  Top
   static final int kIterateEntrySize

See iterateContents()


· kIterateMaxEntries

Summary  |  Top
   static final int kIterateMaxEntries

See iterateContents()


· kIterateBufferSize

Summary  |  Top
   static final int kIterateBufferSize

See iterateContents()


· kIterateNameSize

Summary  |  Top
   static final int kIterateNameSize

See iterateContents()


· kIterateTypeOffset

Summary  |  Top
   static final int kIterateTypeOffset

See iterateContents()


· kIterateFlagsOffset

Summary  |  Top
   static final int kIterateFlagsOffset

See iterateContents()


· kIterateIsFile

Summary  |  Top
   static final int kIterateIsFile

See iterateContents()


· kIterateIsDir

Summary  |  Top
   static final int kIterateIsDir

See iterateContents()


· kIterateIsAlias

Summary  |  Top
   static final int kIterateIsAlias

See iterateContents()


· kIterateIsHiddenMask

Summary  |  Top
   static final int kIterateIsHiddenMask

See iterateContents()


· kMonitorInfoNumInts

Summary  |  Top
   static final int kMonitorInfoNumInts

Used in retrieving monitor information; see the 'getAllMonitorInfo' method.


· kGetProcessesNameLen

Summary  |  Top
   static final int kGetProcessesNameLen


· kDateBundleArrayLen

Summary  |  Top
   static final int kDateBundleArrayLen

The getFileDate() and getVolumeDate() methods are passed an array of java ints, into which the native code puts the modification, creation and access dates. Each date takes 6 ints: year, month, day, hour, minute, and second. This defines the total length of the jint array.


· DATE_MOD_OFFSET

Summary  |  Top
   static final int DATE_MOD_OFFSET

The offset of the modification date in the array passed to getFileDate() and getVolumeDate().


· DATE_CRE_OFFSET

Summary  |  Top
   static final int DATE_CRE_OFFSET

The offset of the creation date in the array passed to getFileDate() and getVolumeDate().


· DATE_BKUP_OFFSET

Summary  |  Top
   static final int DATE_BKUP_OFFSET

The offset of the backup date in the array passed to getFileDate() and getVolumeDate().


· kSetForkLengthDATA

Summary  |  Top
   static final int kSetForkLengthDATA

See the 'whichFork' argument to setForkLength().


· kSetForkLengthRSRC

Summary  |  Top
   static final int kSetForkLengthRSRC


· kUnused

Summary  |  Top
   private static final int kUnused


  Constructors

· AppUtilsMRJ

Summary  |  Top

   private AppUtilsMRJ() 


  Methods

· createFullPathName

Summary  |  Top
   static String createFullPathName(int vRef, 
                                    int parID, 
                                    byte[] pName) 

Returns a full path name created from an FSSpec. The name will be in MRJ format: quoted-printable, and with '/' as the separator.

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string



· getProcesses

Summary  |  Top
   static int getProcesses(int maxToReturn, 
                           int flags, 
                           int[] numRet, 
                           int[] vRefs, 
                           int[] parIDs, 
                           byte[] pNames, 
                           int[] psnLo, 
                           int[] psnHi, 
                           int[] proFlags) 

Gets a list of the running processes. Information on each process is placed into a series of arrays.
WANC

Parameter Description
maxToReturn the lengths of the 'vRefs', 'parIDs', 'psnLo', 'psnHi', and 'proFlags' arrays.
flags 0 or a combination of the FileRegistry.kGetProcesses??? flags
numRet the number of processes returned will be placed at numRet[ 0 ]
vRefs the vRefNum of the file of each process will be placed at each element of this array. Must have at least 'maxToReturn' elements.
parIDs the parID of the file of each process will be placed at each element of this array. Must have at least 'maxToReturn' elements.
pNames the name of the file of each process will be placed into this array; each name will be a Pascal string, and will occupy 'kGetProcessesNameLen' elements. Must have at least 'maxToReturn' * 'kGetProcessesNameLen' elements.
psnLo the low int of the process' PSN will be placed at each element of this array. Must have at least 'maxToReturn' elements.
psnHi the high int of the process' PSN will be placed at each element of this array. Must have at least 'maxToReturn' elements.
proFlags flags on the process will be placed at each element of this array. Not currently used. Must have at least 'maxToReturn' elements.



· getAllMonitorInfo

Summary  |  Top
   static int getAllMonitorInfo(int[] monitorInfo, 
                                int maxToReturn, 
                                int[] numReturned) 

Gets information on all the user's monitors. Info on each monitor will be placed into the 'monitorInfo' int array. Each monitor consumes 'kMonitorInfoNumInts' elements of this array. The format of each monitor is as described in the 'getMainMonitorInfo' method.
WANC

Parameter Description
montitorInfo must have at least 'maxToReturn' * kMonitorInfoNumInts elements.
maxToReturn the maximum number of monitors to return info on.
numReturned the number of monitors returned will be placed at numReturned[ 0 ]



· getMainMonitorInfo

Summary  |  Top
   static int getMainMonitorInfo(int[] monitorInfo) 

Stores information on the user's main monitor into the 'monitorInfo' array. This array must have at least 'kMonitorInfoNumInts' elements. The information on the monitor is stored at the 'kOffs???' offsets defined in 'MonitorMRJ.java':
WANC



· launchApp

Summary  |  Top
   static int launchApp(int vRef, 
                        int parID, 
                        byte[] pName, 
                        int[] retPSN, 
                        int flags) 

Launches an app without any arguments.
WANC

Parameter Description
vRef the vRefNum of the app's file
parID the parID of the app's file
pName the name of the app's file, as a Pascal string
retPSN on return, the process' PSN will be stored in this array, the low int of the PSN at 'kPSNLoOffset', and the high int at 'kPSNHiOffset'
flags 0, or AppFile.AF_NO_LAYER_SWITCH



· launchWithDoc

Summary  |  Top
   static int launchWithDoc(int whichCommand, 
                            int vRef, 
                            int parID, 
                            byte[] pName, 
                            String[] filePaths, 
                            int[] retPSN, 
                            int flags) 

Launches an app with one or more documents.
WANC

Parameter Description
whichCommand either kLaunchWithDocOpenDoc or kLaunchWithDocPrintDoc
vRef the vRefNum of the app's file
parID the parID of the app's file
pName the name of the app's file, as a Pascal string
filePaths the full paths of the files to open the app with
retPSN on return, the process' PSN will be stored in this array, the low int of the PSN at 'kPSNLoOffset', and the high int at 'kPSNHiOffset'
flags 0, or AppFile.AF_NO_LAYER_SWITCH



· getContainer

Summary  |  Top
   static int getContainer(int vRef, 
                           int parID, 
                           byte[] pName, 
                           int[] pContParID, 
                           byte[] pContName) 

Get the folder which contains a file.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string
pContParID the parID of the container will be placed at pContParID[ 0 ]
pContName the name of the container will be placed into this array as a Pascal string. Must have kPNameLen or more elements.



· iterateContents

Summary  |  Top
   static int iterateContents(int vRef, 
                              int parID, 
                              byte[] pName, 
                              int[] dirIDArray, 
                              int[] numRet, 
                              byte[] buffer, 
                              int numEntries, 
                              int flags) 

Get the names and other information on the objects inside a folder. The native code puts information on each file or folder into a byte array. Each entry in this array is 'kIterateEntrySize' bytes long; the name of the object occupies the first 'kIterateNameSize' bytes. The type of the object is stored at offset 'kIterateTypeOffset', and will have the value 'kIterateIsFile', 'kIterateIsDir', or 'kIterateIsAlias'. Flags on the object are stored at offset 'kIterateFlagsOffset'. This is not currently used.
WANC

Parameter Description
vRef the vRefNum of the folder
parID the parID of the folder
pName the name of the folder, as a Pascal string
dirIDArray the dirID of the folder will be placed at dirIDArray[ 0 ]
numRet the number of objects returned will be placed at numRet[ 0 ]
buffer will hold information on each object, in the format given above.
numEntries the number of entries which 'buffer' can hold
flags 0, or one or more of the FileRegistry.kIgnore??? flags



· iterateVolumeContents

Summary  |  Top
   static int iterateVolumeContents(int vRef, 
                                    int[] dirIDArray, 
                                    int[] numRet, 
                                    byte[] buffer, 
                                    int numEntries, 
                                    int flags) 

Get the names and other information on the objects inside the root level of a volume. The native code puts information on each file or folder into a byte array in the same format as described for the 'iterateContents' method.
WANC

Parameter Description
vRef the vRefNum of the volume
dirIDArray the dirID of the volume will be placed at dirIDArray[ 0 ]
numRet the number of objects returned will be placed at numRet[ 0 ]
buffer will hold information on each object, in the format described for the 'iterateContents' method.
numEntries the number of entries which 'buffer' can hold
flags 0, or one or more of the FileRegistry.kIgnore??? flags



· createVolumeAlias

Summary  |  Top
   static int createVolumeAlias(int targetVRef, 
                                String newAlias, 
                                int creator, 
                                int flags) 

Creates an alias to a volume
WANC

Parameter Description
targetVRef the vRefNum of the target volume
newAlias the full path of the new alias
creator ignored; set to 0
flags Needs to be documented



· getVolumeFinderInfo

Summary  |  Top
   static int getVolumeFinderInfo(int vRef, 
                                  int[] finfo) 

Gets the FinderInfo for a volume.
WANC

Parameter Description
vRef the vRefNum of the volume
on return, contains the finder info



· setColorCoding

Summary  |  Top
   static int setColorCoding(int vRef, 
                             int parID, 
                             byte[] pName, 
                             int newCoding) 

Sets the color coding of a file.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string
newCoding the new color coding



· setVolumeColorCoding

Summary  |  Top
   static int setVolumeColorCoding(int vRef, 
                                   int newCoding) 

Sets the color coding of a volume.
WANC

Parameter Description
vRef the vRefNum of the volume
newCoding the new color coding



· getFileCategory

Summary  |  Top
   static int getFileCategory(int vRef, 
                              int parID, 
                              byte[] pName, 
                              int[] cat) 

Gets the type of a file.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string
cat the type of the file will be placed at cat[ 0 ], and will be one of the 'kCategory???' values



· resolveAlias

Summary  |  Top
   static int resolveAlias(int inVRef, 
                           int inParID, 
                           byte[] pInName, 
                           int[] outVRefAndParID, 
                           byte[] pOutName, 
                           int flags) 

Resolves an alias file.
WANC

Parameter Description
inVRef the vRefNum of the alias
inParID the parID of the alias
pInName the name of the alias, as a Pascal string
outVRefAndParID the vRef of the resolved alias will be placed at vRefAndParID[ 0 ] the parID of the resolved alias will be placed at vRefAndParID[ 1 ]
pOutName the name of the resolved alias will be placed in this array as a Pascal string. This array must have at least kPNameLen elements.
flags either FileRegistry.ALIAS_UI or FileRegistry.ALIAS_NO_UI



· createAlias

Summary  |  Top
   static int createAlias(int vRef, 
                          int parID, 
                          byte[] pName, 
                          String newAlias, 
                          int creator, 
                          int flags) 

Creates an alias to a file or folder.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string
newAlias the full path of the new alias
creator Needs to be documented
flags Needs to be documented



· getVolumeCapacity

Summary  |  Top
   static int getVolumeCapacity(int vRef, 
                                long[] cap) 

Returns the capacity of a volume
WANC

Parameter Description
vRef the vRefNum of the volume
cap the capacity will be placed at cap[ 0 ]



· getVolumeFreeSpace

Summary  |  Top
   static int getVolumeFreeSpace(int vRef, 
                                 long[] space) 

Returns the free space of a volume
WANC

Parameter Description
vRef the vRefNum of the volume
cap the free space will be placed at cap[ 0 ]



· getVolumeName

Summary  |  Top
   static int getVolumeName(int vRef, 
                            byte[] pName) 

Gets the name of a volume
WANC

Parameter Description
vRef the vRefNum
pName the name will be placed in this array as a Pascal string This array must have at least kPNameLen elements.



· renameVolume

Summary  |  Top
   static int renameVolume(int vRef, 
                           String newName) 

Renames a volume.
WANC

Parameter Description
vRef the vRefNum
newName the new name of the volume



· renameFile

Summary  |  Top
   static int renameFile(int vRef, 
                         int parID, 
                         byte[] pName, 
                         byte[] pOutName, 
                         String newName) 

Renames a file or folder.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string
pOutName returns the new name of the file, as a Pascal string Must have at least kPNameLen elements.
newName the new name of the file



· getForkSizes

Summary  |  Top
   static int getForkSizes(int vRef, 
                           int parID, 
                           byte[] pName, 
                           long[] sizes) 

Gets the sizes of a file's data and resource forks.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string
sizes must have at least kForkSizesLen elements the data fork size will be placed at sizes[ kForkSizesDataOffset ], and the resource fork size will be placed at sizes[ kForkSizesRsrcOffset ]



· updateContainer

Summary  |  Top
   static int updateContainer(int vRef, 
                              int parID, 
                              byte[] pName) 

Updates the folder which contains a file.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string



· getDiskVolumeFlags

Summary  |  Top
   static int getDiskVolumeFlags(int vRef, 
                                 int[] flags) 

Gets the flags for a volume. These flags are defined in DiskVolume.java.
WANC

Parameter Description
vRef the vRefNum of the volume
flags the flags will be placed at flags[ 0 ]



· setDiskVolumeFlags

Summary  |  Top
   static int setDiskVolumeFlags(int vRef, 
                                 int flagMask, 
                                 int newFlags) 

Sets the flags for a volume. These flags are defined in DiskVolume.java.
WANC

Parameter Description
vRef the vRefNum of the volume
flagsMask indicates which flags in newFlags are significant
newFlags which flags to set or reset



· getDiskVolumeReadFlagsMask

Summary  |  Top
   static int getDiskVolumeReadFlagsMask(int vRef, 
                                         int[] masks) 

Indicates which flags returned by 'getDiskVolumeFlags' are significant.
WANC

Parameter Description
vRef the vRefNum of the volume
masks the mask will be placed at masks[ 0 ]



· getDiskVolumeWriteFlagsMask

Summary  |  Top
   static int getDiskVolumeWriteFlagsMask(int vRef, 
                                          int[] masks) 

Indicates which flags can be set for the volume.
WANC

Parameter Description
vRef the vRefNum of the volume
masks the mask will be placed at masks[ 0 ]



· getVolumes

Summary  |  Top
   static int getVolumes(int maxToReturn, 
                         int[] numRet, 
                         int[] vRefs) 

Gets the vRefNums of the currently mounted volumes.
WANC

Parameter Description
maxToReturn the maximum number of volumes to return
numRet the number returned will be placed at numRet[ 0 ]
vRefs the vRefNum of each volume will be placed in this array. Must have at least 'maxToReturn' elements.



· getFTACIconSuite

Summary  |  Top
   static int getFTACIconSuite(int vRef, 
                               int creator, 
                               int type, 
                               int selector, 
                               int[] pHSuite) 

Gets the icon suite for a file type.
WANC

Parameter Description
vRef the volume to search for that type
creator the file's creator
type the file's type
selector unused; set to 0
pHSuite the suite's handle will be placed at pHSuite[ 0 ]



· getVolumeIconSuite

Summary  |  Top
   static int getVolumeIconSuite(int vRef, 
                                 int selector, 
                                 int[] pHSuite) 

Gets the icon suite for a volume.
WANC

Parameter Description
vRef the vRefNum of the volume
selector unused; set to 0
pHSuite the suite's handle will be placed at pHSuite[ 0 ]



· getFileIconSuite

Summary  |  Top
   static int getFileIconSuite(int vRef, 
                               int parID, 
                               byte[] pName, 
                               int selector, 
                               int[] pHSuite) 

Gets the icon suite for a file.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string
selector unused; set to 0
pHSuite the suite's handle will be placed at pHSuite[ 0 ]



· plotIcon

Summary  |  Top
   static int plotIcon(int which, 
                       int width, 
                       int height, 
                       int hSuite, 
                       int xform, 
                       int align, 
                       int[] pData) 

Draws an icon of an icon suite.
WANC

Parameter Description
which either IconBundle.ICON_LARGE or IconBundle.ICON_SMALL
width the width of the icon
height the height of the icon
hSuite the icon suite
xform any transformation to be applied to the icon
align any alignment to tbe applied to the icon
pData an array of ints which will hold the Java format ARGB data for the icon This must have at least width * height elements



· disposeIconSuite

Summary  |  Top
   static int disposeIconSuite(int hSuite, 
                               int flags) 

Disposes an icon suite.
WANC

Parameter Description
hSuite the icon suite
flags passed to Mac API DisposeIconSuite()



· getDiskFileFlags

Summary  |  Top
   static int getDiskFileFlags(int vRef, 
                               int parID, 
                               byte[] pName, 
                               int[] flags) 

Gets the flags for a file. These flags are defined in DiskFile.java.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string
flags the flags will be placed at flags[ 0 ]



· setDiskFileFlags

Summary  |  Top
   static int setDiskFileFlags(int vRef, 
                               int parID, 
                               byte[] pName, 
                               int flagMask, 
                               int newFlags) 

Sets the flags for a file. These flags are defined in DiskFile.java.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string
flagsMask indicates which flags in newFlags are significant
newFlags which flags to set or reset



· getDiskFileReadFlagsMask

Summary  |  Top
   static int getDiskFileReadFlagsMask(int vRef, 
                                       int parID, 
                                       byte[] pName, 
                                       int[] masks) 

Indicates which flags returned by 'getDiskVolumeFlags' are significant.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string
masks the mask will be placed at masks[ 0 ]



· getDiskFileWriteFlagsMask

Summary  |  Top
   static int getDiskFileWriteFlagsMask(int vRef, 
                                        int parID, 
                                        byte[] pName, 
                                        int[] masks) 

Indicates which flags can be set for the file.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string
masks the mask will be placed at masks[ 0 ]



· verifyFile

Summary  |  Top
   static int verifyFile(int vRef, 
                         int parID, 
                         byte[] pName) 

Verifies whether a file exists.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string



· verifyVolume

Summary  |  Top
   static int verifyVolume(int vRef) 

Verifies whether a volume is still mounted.
WANC

Parameter Description
vRef the vRefNum of the volume



· fullPathToSpec

Summary  |  Top
   static int fullPathToSpec(String fullPath, 
                             int[] vRefAndParID, 
                             byte[] pName) 

Converts a full path name to a FSSpec.
WANC

Parameter Description
fullPath the full path, in MRJ format: quoted-printable, and with '/' as the separator.
vRefAndParID the vRef of the file will be placed at vRefAndParID[ 0 ] the parID of the file will be placed at vRefAndParID[ 1 ]
pName the name of the file will be placed in this array, in Pascal format This array must have at least kPNameLen elements.



· getFinderInfo

Summary  |  Top
   static int getFinderInfo(int vRef, 
                            int parID, 
                            byte[] pName, 
                            int[] finfo) 

Gets the creator, type, flags, and attributes of a file.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string
finfo information on the file will be placed in this array. This must have at least 4 elements, which will be placed as follows: creator at finfo[ 0 ], type at finfo[ 1 ], flags at finfo[ 2 ], attribs at finfo[ 3 ]



· setCreatorAndType

Summary  |  Top
   static int setCreatorAndType(int vRef, 
                                int parID, 
                                byte[] pName, 
                                int[] creatorAndType) 

Sets the FinderInfo of a file.
WANC

Parameter Description
vRef the vRefNum of the file
parID the parID of the file
pName the name of the file, as a Pascal string
creatorAndType the new creator should be at creatorAndType[ 0 ], and the new type at creatorAndType[ 1 ]



· sendAppDocs

Summary  |  Top
   static int sendAppDocs(int whichCommand, 
                          int[] appPSN, 
                          String[] filePaths, 
                          int flags) 

Sends an AppleEvent to a process.
WANC

Parameter Description
whichCommand either 'kSendAppDocsOpenDoc' or 'kSendAppDocsPrintDoc'
appPSN the PSN of the process. The low int of the PSN should be at 'kPSNLoOffset', and the high int at 'kPSNHiOffset'
filePaths full paths of the documents to be sent to the app
flags unused; set to 0



· quitApp

Summary  |  Top
   static int quitApp(int[] appPSN, 
                      int flags) 

Quits a process.
WANC

Parameter Description
appPSN the PSN of the process. The low int of the PSN should be at 'kPSNLoOffset', and the high int at 'kPSNHiOffset'
flags unused; set to 0



· moveApp

Summary  |  Top
   static int moveApp(int[] appPSN, 
                      int selector, 
                      int flags) 

Moves a process.
WANC

Parameter Description
appPSN the PSN of the process. The low int of the PSN should be at 'kPSNLoOffset', and the high int at 'kPSNHiOffset'
selector one of the values defined in FileRegistry: 'APP_MOVE_TOFRONT', etc.
flags unused; set to 0



· verifyPSN

Summary  |  Top
   static int verifyPSN(int[] appPSN) 

Verifies that a process is still running.
WANC

Parameter Description
appPSN the PSN of the process. The low int of the PSN should be at 'kPSNLoOffset', and the high int at 'kPSNHiOffset'



· launchURL

Summary  |  Top
   static int launchURL(String url, 
                        int flags, 
                        String[] preferredBrowsers) 

Launches the given URL.

Parameter Description
url the fully qualified URL
flags currently ignored
preferredBrowsers currently ignored



· getFileDate

Summary  |  Top
   static int getFileDate(int vRef, 
                          int parID, 
                          byte[] pName, 
                          int[] datesArray) 

Get the dates of a file into an array of ints
WANC

Parameter Description
datesArray the three dates for the file are placed in this array, in the order: modification, creation, backup



· setFileDate

Summary  |  Top
   static int setFileDate(int vRef, 
                          int parID, 
                          byte[] pName, 
                          int[] datesArray) 

Set the dates of a file from an array of ints
WANC

Parameter Description
datesArray the three dates for the file should be placed in this array, in the order: modification, creation, backup



· getVolumeDate

Summary  |  Top
   static int getVolumeDate(int vRef, 
                            int[] datesArray) 

Get the dates of a volume into an array of ints
WANC

Parameter Description
datesArray the three dates for the volume are placed in this array, in the order: modification, creation, backup



· setVolumeDate

Summary  |  Top
   static int setVolumeDate(int vRef, 
                            int[] datesArray) 

Set the dates of a volume from an array of ints
WANC

Parameter Description
datesArray the three dates for the volume should be placed in this array, in the order: modification, creation, backup



· getOpenableFileTypes

Summary  |  Top
   static int getOpenableFileTypes(int vRef, 
                                   int creator, 
                                   int[] numReturned, 
                                   int[] fileTypes) 


WANC



· getRawResourceFork

Summary  |  Top
   static int getRawResourceFork(int flags, 
                                 int vRef, 
                                 int parID, 
                                 byte[] pName, 
                                 byte[] data) 


WANC



· setRawResourceFork

Summary  |  Top
   static int setRawResourceFork(int flags, 
                                 int vRef, 
                                 int parID, 
                                 byte[] pName, 
                                 byte[] data) 


WANC



· setForkLength

Summary  |  Top
   static int setForkLength(int flags, 
                            int whichFork, 
                            int vRef, 
                            int parID, 
                            byte[] pName, 
                            long newLen) 


WANC



· nGetRawResourceFork

Summary  |  Top
   private static native int nGetRawResourceFork(int flags, 
                                                 int vRef, 
                                                 int parID, 
                                                 byte[] pName, 
                                                 byte[] data) 


· nSetRawResourceFork

Summary  |  Top
   private static native int nSetRawResourceFork(int flags, 
                                                 int vRef, 
                                                 int parID, 
                                                 byte[] pName, 
                                                 byte[] data) 


· nSetForkLength

Summary  |  Top
   private static native int nSetForkLength(int flags, 
                                            int whichFork, 
                                            int vRef, 
                                            int parID, 
                                            byte[] pName, 
                                            long newLen) 


· nSendAppDocs

Summary  |  Top
   private static native int nSendAppDocs(int whichCommand, 
                                          int[] appPSN, 
                                          String[] filePaths, 
                                          int flags) 


· nQuitApp

Summary  |  Top
   private static native int nQuitApp(int[] appPSN, 
                                      int flags) 


· nLaunchApp

Summary  |  Top
   private static native int nLaunchApp(int vRef, 
                                        int parID, 
                                        byte[] pName, 
                                        int[] retPSN, 
                                        int flags) 


· nLaunchWithDoc

Summary  |  Top
   private static native int nLaunchWithDoc(int whichCommand, 
                                            int vRef, 
                                            int parID, 
                                            byte[] pName, 
                                            String[] filePaths, 
                                            int[] retPSN, 
                                            int flags) 


· nCreateFullPathName

Summary  |  Top
   private static native int nCreateFullPathName(int vRef, 
                                                 int parID, 
                                                 byte[] pName, 
                                                 String[] retArray) 


· nGetOpenableFileTypes

Summary  |  Top
   private static native int nGetOpenableFileTypes(int vRef, 
                                                   int creator, 
                                                   int[] numReturned, 
                                                   int[] fileTypes) 


· nGetFileDate

Summary  |  Top
   private static native int nGetFileDate(int unused, 
                                          int vRef, 
                                          int parID, 
                                          byte[] pName, 
                                          int[] datesArray) 

Called by getFileDate

Parameter Description
unused no longer used, set to 0 all three dates for the file are placed in the 'datesArray' argument, in the order: modification, creation, backup



· nSetFileDate

Summary  |  Top
   private static native int nSetFileDate(int unused, 
                                          int vRef, 
                                          int parID, 
                                          byte[] pName, 
                                          int[] datesArray) 

Called by xetFileDate

Parameter Description
unused no longer used, set to 0 all three dates for the file should be placed in the 'datesArray' argument, in the order: modification, creation, backup



· nGetVolumeDate

Summary  |  Top
   private static native int nGetVolumeDate(int unused, 
                                            int vRef, 
                                            int[] datesArray) 

Called by getVolumeDate

Parameter Description
unused no longer used, set to 0 all three dates for the volume are placed in the 'datesArray' argument, in the order: modification, creation, backup



· nSetVolumeDate

Summary  |  Top
   private static native int nSetVolumeDate(int unused, 
                                            int vRef, 
                                            int[] datesArray) 

Called by setVolumeDate

Parameter Description
unused no longer used, set to 0 all three dates for the volume should be placed in the 'datesArray' argument, in the order: modification, creation, backup



· nVerifyPSN

Summary  |  Top
   private static native int nVerifyPSN(int[] appPSN) 


· nMoveApp

Summary  |  Top
   private static native int nMoveApp(int[] appPSN, 
                                      int selector, 
                                      int flags) 


· nLaunchURLDirect

Summary  |  Top
   private static native int nLaunchURLDirect(String url, 
                                              int flags, 
                                              String[] preferredBrowsers) 


· nFullPathToSpec

Summary  |  Top
   private static native int nFullPathToSpec(String fullPath, 
                                             int[] vRefAndParID, 
                                             byte[] pName) 


· nGetFinderInfo

Summary  |  Top
   private static native int nGetFinderInfo(int vRef, 
                                            int parID, 
                                            byte[] pName, 
                                            int[] finfo) 


· nSetCreatorAndType

Summary  |  Top
   private static native int nSetCreatorAndType(int vRef, 
                                                int parID, 
                                                byte[] pName, 
                                                int[] creatorAndType) 


· nVerifyFile

Summary  |  Top
   private static native int nVerifyFile(int vRef, 
                                         int parID, 
                                         byte[] pName) 


· nVerifyVolume

Summary  |  Top
   private static native int nVerifyVolume(int vRef) 


· nGetDiskFileFlags

Summary  |  Top
   private static native int nGetDiskFileFlags(int vRef, 
                                               int parID, 
                                               byte[] pName, 
                                               int[] flags) 


· nSetDiskFileFlags

Summary  |  Top
   private static native int nSetDiskFileFlags(int vRef, 
                                               int parID, 
                                               byte[] pName, 
                                               int flagMask, 
                                               int newFlags) 


· nGetDFWriteFlagsMask

Summary  |  Top
   private static native int nGetDFWriteFlagsMask(int vRef, 
                                                  int parID, 
                                                  byte[] pName, 
                                                  int[] masks) 


· nGetDFReadFlagsMask

Summary  |  Top
   private static native int nGetDFReadFlagsMask(int vRef, 
                                                 int parID, 
                                                 byte[] pName, 
                                                 int[] masks) 


· nGetDiskVolumeFlags

Summary  |  Top
   private static native int nGetDiskVolumeFlags(int vRef, 
                                                 int[] flags) 


· nSetDiskVolumeFlags

Summary  |  Top
   private static native int nSetDiskVolumeFlags(int vRef, 
                                                 int flagMask, 
                                                 int newFlags) 


· nGetDVReadFlagsMask

Summary  |  Top
   private static native int nGetDVReadFlagsMask(int vRef, 
                                                 int[] masks) 


· nGetDVWriteFlagsMask

Summary  |  Top
   private static native int nGetDVWriteFlagsMask(int vRef, 
                                                  int[] masks) 


· nGetVolumes

Summary  |  Top
   private static native int nGetVolumes(int maxToReturn, 
                                         int[] numRet, 
                                         int[] vRefs) 


· nUpdateContainer

Summary  |  Top
   private static native int nUpdateContainer(int vRef, 
                                              int parID, 
                                              byte[] pName) 


· nGetFileCategory

Summary  |  Top
   private static native int nGetFileCategory(int vRef, 
                                              int parID, 
                                              byte[] pName, 
                                              int[] cat) 


· nGetForkSizes

Summary  |  Top
   private static native int nGetForkSizes(int vRef, 
                                           int parID, 
                                           byte[] pName, 
                                           long[] len) 


· nRenameFile

Summary  |  Top
   private static native int nRenameFile(int vRef, 
                                         int parID, 
                                         byte[] pName, 
                                         byte[] pOutName, 
                                         String newName) 


· nRenameVolume

Summary  |  Top
   private static native int nRenameVolume(int vRef, 
                                           String newName) 


· nGetVolumeCapacity

Summary  |  Top
   private static native int nGetVolumeCapacity(int vRef, 
                                                long[] cap) 


· nGetVolumeFreeSpace

Summary  |  Top
   private static native int nGetVolumeFreeSpace(int vRef, 
                                                 long[] space) 


· nCreateAlias

Summary  |  Top
   private static native int nCreateAlias(int vRef, 
                                          int parID, 
                                          byte[] pName, 
                                          String newAlias, 
                                          int creator, 
                                          int flags) 


· nGetVolumeName

Summary  |  Top
   private static native int nGetVolumeName(int vRef, 
                                            byte[] pName) 


· nResolveAlias

Summary  |  Top
   private static native int nResolveAlias(int inVRef, 
                                           int inParID, 
                                           byte[] pInName, 
                                           int[] outVRefAndParID, 
                                           byte[] pOutName, 
                                           int flags) 


· nSetColorCoding

Summary  |  Top
   private static native int nSetColorCoding(int vRef, 
                                             int parID, 
                                             byte[] pName, 
                                             int newCoding) 


· nSetVolumeColorCoding

Summary  |  Top
   private static native int nSetVolumeColorCoding(int vRef, 
                                                   int newCoding) 


· nGetVolumeFinderInfo

Summary  |  Top
   private static native int nGetVolumeFinderInfo(int vRef, 
                                                  int[] finfo) 


· nGetVolumeIconSuite

Summary  |  Top
   private static native int nGetVolumeIconSuite(int vRef, 
                                                 int selector, 
                                                 int[] pHSuite) 


· nGetFileIconSuite

Summary  |  Top
   private static native int nGetFileIconSuite(int vRef, 
                                               int parID, 
                                               byte[] pName, 
                                               int selector, 
                                               int[] pHSuite) 


· nGetFTACIconSuite

Summary  |  Top
   private static native int nGetFTACIconSuite(int vRef, 
                                               int creator, 
                                               int type, 
                                               int selector, 
                                               int[] pHSuite) 


· nPlotIcon

Summary  |  Top
   private static native int nPlotIcon(int which, 
                                       int width, 
                                       int height, 
                                       int hSuite, 
                                       int xform, 
                                       int align, 
                                       int[] pData) 


· nCreateVolumeAlias

Summary  |  Top
   private static native int nCreateVolumeAlias(int targetVRef, 
                                                String newAlias, 
                                                int creator, 
                                                int flags) 


· nIterateContents

Summary  |  Top
   private static native int nIterateContents(int vRef, 
                                              int parID, 
                                              byte[] pName, 
                                              int[] dirIDArray, 
                                              int[] numRet, 
                                              byte[] buffer, 
                                              int numEntries, 
                                              int flags) 


· nIVC

Summary  |  Top
   private static native int nIVC(int vRef, 
                                  int[] dirIDArray, 
                                  int[] numRet, 
                                  byte[] buffer, 
                                  int numEntries, 
                                  int flags) 


· nGetContainer

Summary  |  Top
   private static native int nGetContainer(int vRef, 
                                           int parID, 
                                           byte[] pName, 
                                           int[] pContParID, 
                                           byte[] pContName) 


· nDisposeIconSuite

Summary  |  Top
   private static native int nDisposeIconSuite(int hSuite, 
                                               int flags) 


· nGetAllMonitorInfo

Summary  |  Top
   private static native int nGetAllMonitorInfo(int[] monitorInfo, 
                                                int maxToReturn, 
                                                int[] numReturned) 


· nGetMainMonitorInfo

Summary  |  Top
   private static native int nGetMainMonitorInfo(int[] monitorInfo) 


· nGetProcesses

Summary  |  Top
   private static native int nGetProcesses(int maxToReturn, 
                                           int flags, 
                                           int[] numRet, 
                                           int[] vRefs, 
                                           int[] parIDs, 
                                           byte[] pNames, 
                                           int[] psnLo, 
                                           int[] psnHi, 
                                           int[] proFlags) 


· testLink

Summary  |  Top
   static void testLink() 

Calls each of the native methods with invalid arguments. Used to test if there are link problems.



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