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
java.lang.Object | +----com.jconfig.mac.ResFileMRJ
Summary |
class ResFileMRJ extends java.lang.Object { // Fields 12 public static final int RESFORK_OPENEXISTING; public static final int RESFORK_READONLY; private static final String copyrightString; private int fileFD; public static final int kResTypeSIZE; public static final int kResTypevers; private static IToolboxLock lockObject; private int mode; private byte[] pName; private int parID; private int perms; private int vRef; // Constructors 1 ResFileMRJ(int, int, byte[], int, int) throws IOException; // Methods 14 private static void call_nCloseResFile(int); private static int call_nGetResource(int, int, int, byte[]); private static int call_nGetResourceSize(int, int, int, int[]); private static int call_nOpenExistingResFile(int, int, byte[]); static IToolboxLock getLockObject(); private static native void nCloseResFile(int); private static native int nGetResource(int, int, int, byte[]); private static native int nGetResourceSize(int, int, int, int[]); private static native int nOpenExistingResFile(int, int, byte[]); static void setLockObject(IToolboxLock); static void testLink(); public void close(); public byte[] getResource(int, int); public int open(); }
Used to read resources from files on Mac.
Fields |
· copyrightString | Summary | Top |
private static final String copyrightString
· RESFORK_OPENEXISTING | Summary | Top |
public static final int RESFORK_OPENEXISTING
See the constructor
· RESFORK_READONLY | Summary | Top |
public static final int RESFORK_READONLY
See the constructor
· kResTypevers | Summary | Top |
public static final int kResTypevers
'vers'
· kResTypeSIZE | Summary | Top |
public static final int kResTypeSIZE
'SIZE'
· fileFD | Summary | Top |
private int fileFD
· vRef | Summary | Top |
private int vRef
· parID | Summary | Top |
private int parID
· mode | Summary | Top |
private int mode
· perms | Summary | Top |
private int perms
· pName | Summary | Top |
private byte[] pName
· lockObject | Summary | Top |
private static IToolboxLock lockObject
Constructors |
· ResFileMRJ | Summary | Top |
ResFileMRJ(int vRef, int parID, byte[] pNm, int mode, int perms) throws IOException
Saves the values passed to this routine, but does not open the resource fork. To open the resource fork, call the 'open' method.
Parameter Description vRef the vRefNum of the file parID the parID of the file pName the name of the file, as a Pascal string mode must be RESFORK_OPENEXISTING perms must be RESFORK_READONLY
Methods |
· setLockObject | Summary | Top |
static void setLockObject(IToolboxLock lock)
· getLockObject | Summary | Top |
static IToolboxLock getLockObject()
· open | Summary | Top |
public int open()
Open the resource fork. Returns -1 if an error occurs, ErrCodes.ERROR_NONE otherwise.
· getResource | Summary | Top |
public byte[] getResource(int resName, int resID)
Read a resource of the given type and id. Returns a byte array containing the data, or null if an error occurs..
· close | Summary | Top |
public void close()
Close the resource fork. Call this after calling open().
· call_nOpenExistingResFile | Summary | Top |
private static int call_nOpenExistingResFile(int vRef, int parID, byte[] pName)
· call_nCloseResFile | Summary | Top |
private static void call_nCloseResFile(int fileFD)
· call_nGetResourceSize | Summary | Top |
private static int call_nGetResourceSize(int fileFD, int resName, int resID, int[] retSize)
· call_nGetResource | Summary | Top |
private static int call_nGetResource(int fileFD, int resName, int resID, byte[] data)
· nOpenExistingResFile | Summary | Top |
private static native int nOpenExistingResFile(int vRef, int parID, byte[] pName)
Given an FSSpec, open the resource fork of an existing file. Returns the file ref num.
· nCloseResFile | Summary | Top |
private static native void nCloseResFile(int fileFD)
Close a previously opened file.
· nGetResourceSize | Summary | Top |
private static native int nGetResourceSize(int fileFD, int resName, int resID, int[] retSize)
Given a file ref num and a resource type and ID, return the resource's size.
· nGetResource | Summary | Top |
private static native int nGetResource(int fileFD, int resName, int resID, byte[] data)
Given a file ref num and a resource type and ID, return the resource data. 'data' must be >= the size of the resource..
· 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 IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7