|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ImageFactory
This interface is used for classes which can produce instances of Image implementors. Classes which implement this interface should provide a zero argument, public constructor so that they can be created using newInstance(). e.g.
Image image; try { Class factoryClass = Class.forName("com.ibm.dtfj.image.j9.ImageFactory"); ImageFactory factory = (ImageFactory) factoryClass.newInstance(); image = factory.getImage(new File(coreFileName), new File(xmlFileName)); } catch (ClassNotFoundException e) { System.err.println("Could not find DTFJ factory class:"); e.printStackTrace(System.err); } catch (IllegalAccessException e) { System.err.println("Could not instantiate DTFJ factory class:"); e.printStackTrace(System.err); } catch (InstantiationException e) { System.err.println("Could not instantiate DTFJ factory class:"); e.printStackTrace(System.err); } catch (IOException e) { System.err.println("Could not find file required for bootstrapping:"); e.printStackTrace(System.err); }
Method Summary | |
---|---|
Image |
getImage(java.io.File imageFile)
Creates a new Image object based on the contents of imageFile |
Image |
getImage(java.io.File imageFile,
java.io.File metadata)
Creates a new Image object based on the contents of imageFile and metadata |
Method Detail |
---|
Image getImage(java.io.File imageFile) throws java.io.IOException
imageFile
- a file with Image information, typically a core file
java.io.IOException
Image getImage(java.io.File imageFile, java.io.File metadata) throws java.io.IOException
imageFile
- a file with Image information, typically a core filemetadata
- a file with additional Image information. This is an implementation defined file
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |