Class PHDImageFactory
java.lang.Object
com.ibm.dtfj.phd.PHDImageFactory
- 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
-
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 newImage
object based on the contents ofimageFile
.Creates a newImage
object based on the contents ofimageFile
andmetadata
.getImage
(ImageInputStream in, URI sourceID) Creates a newImage
object based on the contents of the given input stream.getImage
(ImageInputStream in, ImageInputStream meta, URI sourceID) Creates a newImage
object based on the contents of the given input stream.Image[]
getImagesFromArchive
(File archive, boolean extract) Creates an array ofImage
objects from an archive such as a zip or jar file.
-
Constructor Details
-
PHDImageFactory
public PHDImageFactory()
-
-
Method Details
-
getImage
Description copied from interface:ImageFactory
Creates a newImage
object based on the contents of the given input stream.- Specified by:
getImage
in interfaceImageFactory
- Parameters:
in
- a stream with image information, typically a core filesourceID
-URI
identifying the source of the image stream- Returns:
- an instance of
Image
- Throws:
IOException
- if there's a problem reading the given stream
-
getImage
Description copied from interface:ImageFactory
Creates a newImage
object based on the contents of the given input stream.- Specified by:
getImage
in interfaceImageFactory
- Parameters:
in
- a stream with image information, typically a core filemeta
- a stream with metadata associated with the image streamsourceID
-URI
identifying the source of the image stream- Returns:
- an instance of
Image
- Throws:
IOException
- if there's a problem reading the given streams
-
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
-
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
-
getImage
Description copied from interface:ImageFactory
Creates a newImage
object based on the contents ofimageFile
.- Specified by:
getImage
in interfaceImageFactory
- Parameters:
file
- a file with Image information, typically a core file- Returns:
- an instance of Image
- Throws:
IOException
- if there's a problem reading the specified file
-
getImage
Description copied from interface:ImageFactory
Creates a newImage
object based on the contents ofimageFile
andmetadata
.- Specified by:
getImage
in interfaceImageFactory
- Parameters:
file
- a file with image information, typically a core filemetaFile
- an (implementation-defined) file with additional image information (or null if not required)- Returns:
- an instance of
Image
- Throws:
IOException
- if there's a problem reading either of the specified files
-
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
-