Module openj9.dtfj

Class ImageFactory

java.lang.Object
com.ibm.dtfj.image.j9.ImageFactory
All Implemented Interfaces:
ImageFactory

public class ImageFactory extends Object implements ImageFactory
  • 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

      public Image[] getImagesFromArchive(File archive, boolean extract) throws IOException
      Description copied from interface: ImageFactory
      Creates an array of Image objects from an archive such as a zip or jar file.
      Specified by:
      getImagesFromArchive in interface ImageFactory
      Parameters:
      archive - which typically contains one or more diagnostic artifacts
      extract - true if the files in the archive should be extracted to a temporary directory
      Returns:
      an array of Images
      Throws:
      IOException - if there's a problem reading the specified archive
    • getImage

      public Image getImage(File imageFile) throws IOException
      Creates a new Image object based on the contents of imageFile
      Specified by:
      getImage in interface ImageFactory
      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

      public Image getImage(ImageInputStream in, URI sourceID) throws IOException
      Creates a new Image object based on the contents of input stream
      Specified by:
      getImage in interface ImageFactory
      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

      public Image getImage(ImageInputStream in, ImageInputStream meta, URI sourceID) throws IOException
      Creates a new Image object based on the contents of input stream
      Specified by:
      getImage in interface ImageFactory
      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

      public Image getImage(File imageFile, File metadata) throws IOException
      Creates a new Image object based on the contents of imageFile and metadata
      Specified by:
      getImage in interface ImageFactory
      Parameters:
      imageFile - a file with Image information, typically a core file
      metadata - 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 interface ImageFactory
      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 interface ImageFactory
      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 interface ImageFactory
      Returns:
      an integer corresponding to the DTFJ API modification level