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
Summary |
public interface ResourceFork extends com.jconfig.DumpInfo { // Fields 3 public static final int RESFORK_OPENEXISTING; public static final int RESFORK_READONLY; public static final String copyrightString; // Methods 8 public abstract void closeResources() throws ResourceForkException; public abstract void deleteResourceFork() throws ResourceForkException; public abstract DiskFile getDiskFile(); public abstract byte[] getRawResourceFork() throws ResourceForkException; public abstract byte[] getResource(int, int) throws ResourceForkException; public abstract long getResourceForkSize() throws ResourceForkException; public abstract void openResources(int, int) throws ResourceForkException, IOException; public abstract void setRawResourceFork(byte[]) throws ResourceForkException; }
Represents the resource fork of a file.
Cross Reference |
Fields |
· copyrightString | Summary | Top |
public static final String copyrightString
· RESFORK_OPENEXISTING | Summary | Top |
public static final int RESFORK_OPENEXISTING
See openResources()
· RESFORK_READONLY | Summary | Top |
public static final int RESFORK_READONLY
See openResources()
Methods |
· getDiskFile | Summary | Top |
public abstract DiskFile getDiskFile()
Returns the DiskFile object with which this resource fork is associated.
· getRawResourceFork | Summary | Top |
public abstract byte[] getRawResourceFork() throws ResourceForkException
Returns the raw resource fork of this file. Only valid on Mac.
· setRawResourceFork | Summary | Top |
public abstract void setRawResourceFork(byte[] data) throws ResourceForkException
Sets the raw resource fork of this file.
WARNING: this will overwrite any previous contents of this file's resource fork
If an error occurs in the middle of this routine, the resource fork may be deleted, and the new resource data may not be able to be written.
The data must be in the expected resource format, otherwise Mac errors or crashes may occur when the file is used.
USE WITH CAUTION!
Parameter Description data contains the raw resource fork. Must have length >= 1
· deleteResourceFork | Summary | Top |
public abstract void deleteResourceFork() throws ResourceForkException
Deletes the resource fork.
· getResourceForkSize | Summary | Top |
public abstract long getResourceForkSize() throws ResourceForkException
Returns the size of this resource fork.
· openResources | Summary | Top |
public abstract void openResources(int mode, int perms) throws ResourceForkException, IOException
This method must be called before calling the getResource() method. See that method for more information.
Parameter Description mode currently, must be RESFORK_OPENEXISTING perms currently, must be RESFORK_READONLY
· getResource | Summary | Top |
public abstract byte[] getResource(int resName, int resID) throws ResourceForkException
Returns a resource. openResources() must have been called before calling this routine, and closeResources() must be called when you are finished getting resources:
openResources(...) getResource(...) ... getResource(...) closeResources()You will need to decode the format of the resource.
Parameter Description resName the name of the resource, for instance 'VERS' Use the JUtils.asciiToInt() or similar method to compute this value. resID the ID of the resource
· closeResources | Summary | Top |
public abstract void closeResources() throws ResourceForkException
This method must be called after you are finished getting resources. See the getResource() method
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7