phelps.io

Class Rez

public class Rez extends Object

Parse Macintosh Resource files. Mac resource forks are not readable by Java (or UNIX), but the OS X tool /Developer/Tools/SplitForks can move data from resource to data forks. OS X .dfonts have a resource format in the data fork.

Version: $Revision: 1.2 $ $Date: 2003/12/28 05:30:28 $

Constructor Summary
Rez(RandomAccess ra, long offset)
Method Summary
String[]getNames(int type)
Returns array of names for resource of type, or 0-length array if no such type.
long[]getResource(int type, String name)
Return array of offset and length for data of type and within that name.
long[]getResources(int type)
Returns array of offsets and lengths of data for all resources of type, in the order offset1 length1 offset2 length2 ....
int[]getTypes()

Constructor Detail

Rez

public Rez(RandomAccess ra, long offset)

Method Detail

getNames

public String[] getNames(int type)
Returns array of names for resource of type, or 0-length array if no such type.

getResource

public long[] getResource(int type, String name)
Return array of offset and length for data of type and within that name. Note that not all resources have names, in which case Rez can return all reources, from which one can be selected by position.

getResources

public long[] getResources(int type)
Returns array of offsets and lengths of data for all resources of type, in the order offset1 length1 offset2 length2 ....

getTypes

public int[] getTypes()