java.lang.Object
com.ibm.dtfj.image.j9.ImageFactory
- All Implemented Interfaces:
ImageFactory
-
Field Summary
Fields declared in interface com.ibm.dtfj.image.ImageFactory
DTFJ_LOGGER_NAME, DTFJ_MAJOR_VERSION, DTFJ_MINOR_VERSION, SYSTEM_PROPERTY_TMPDIR
-
Constructor Summary
ConstructorDescriptionThis public constructor is intended for use with Class.newInstance(). -
Method Summary
Modifier and TypeMethodDescriptionint
Fetch the DTFJ major version number.int
Fetch the DTFJ minor version number.int
Fetch the DTFJ modification level.Creates a new Image object based on the contents of imageFileCreates a new Image object based on the contents of imageFile and metadatagetImage
(ImageInputStream in, URI sourceID) Creates a new Image object based on the contents of input streamgetImage
(ImageInputStream in, ImageInputStream meta, URI sourceID) Creates a new Image object based on the contents of input streamImage[]
getImagesFromArchive
(File archive, boolean extract) Creates an array ofImage
objects from an archive such as a zip or jar file.
-
Constructor Details
-
ImageFactory
public ImageFactory()This public constructor is intended for use with Class.newInstance(). This class will generally be referred to by name (e.g. using Class.forName()).- See Also:
-
-
Method Details
-
getImagesFromArchive
Description copied from interface:ImageFactory
Creates an array ofImage
objects from an archive such as a zip or jar file.- Specified by:
getImagesFromArchive
in interfaceImageFactory
- Parameters:
archive
- which typically contains one or more diagnostic artifactsextract
- true if the files in the archive should be extracted to a temporary directory- Returns:
- an array of
Image
s - Throws:
IOException
- if there's a problem reading the specified archive
-
getImage
Creates a new Image object based on the contents of imageFile- Specified by:
getImage
in interfaceImageFactory
- Parameters:
imageFile
- a file with Image information, typically a core file but may also be a container such as a zip- Returns:
- an instance of Image (null if no image can be constructed from the given file)
- Throws:
IOException
-
getImage
Creates a new Image object based on the contents of input stream- Specified by:
getImage
in interfaceImageFactory
- Parameters:
imageFile
- a file with Image information, typically a core file but may also be a container such as a zip- Returns:
- an instance of Image (null if no image can be constructed from the given file)
- Throws:
IOException
-
getImage
Creates a new Image object based on the contents of input stream- Specified by:
getImage
in interfaceImageFactory
- Parameters:
imageFile
- a file with Image information, typically a core file but may also be a container such as a zip- Returns:
- an instance of Image (null if no image can be constructed from the given file)
- Throws:
IOException
-
getImage
Creates a new Image object based on the contents of imageFile and metadata- Specified by:
getImage
in interfaceImageFactory
- Parameters:
imageFile
- a file with Image information, typically a core filemetadata
- a file with additional Image information. This is an implementation defined file- Returns:
- an instance of Image
- Throws:
IOException
-
getDTFJMajorVersion
public int getDTFJMajorVersion()Description copied from interface:ImageFactory
Fetch the DTFJ major version number.- Specified by:
getDTFJMajorVersion
in interfaceImageFactory
- Returns:
- an integer corresponding to the DTFJ API major version number
-
getDTFJMinorVersion
public int getDTFJMinorVersion()Description copied from interface:ImageFactory
Fetch the DTFJ minor version number.- Specified by:
getDTFJMinorVersion
in interfaceImageFactory
- Returns:
- an integer corresponding to the DTFJ API minor version number
-
getDTFJModificationLevel
public int getDTFJModificationLevel()Description copied from interface:ImageFactory
Fetch the DTFJ modification level.- Specified by:
getDTFJModificationLevel
in interfaceImageFactory
- Returns:
- an integer corresponding to the DTFJ API modification level
-