Module openj9.dtfj

Class J9DDRImageFactory

java.lang.Object
com.ibm.j9ddr.view.dtfj.image.J9DDRImageFactory
All Implemented Interfaces:
ImageFactory

public class J9DDRImageFactory extends Object implements ImageFactory
  • Field Details

  • Constructor Details

    • J9DDRImageFactory

      public J9DDRImageFactory()
  • Method Details

    • 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
    • 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(ImageInputStream in, ImageInputStream meta, URI sourceID) throws IOException
      Description copied from interface: ImageFactory
      Creates a new Image object based on the contents of the given input stream.
      Specified by:
      getImage in interface ImageFactory
      Parameters:
      in - a stream with image information, typically a core file
      meta - a stream with metadata associated with the image stream
      sourceID - URI identifying the source of the image stream
      Returns:
      an instance of Image
      Throws:
      IOException - if there's a problem reading the given streams
    • getImage

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

      public Image getImage(ImageInputStream in, URI sourceID) throws IOException
      Description copied from interface: ImageFactory
      Creates a new Image object based on the contents of the given input stream.
      Specified by:
      getImage in interface ImageFactory
      Parameters:
      in - a stream with image information, typically a core file
      sourceID - 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

      public Image getImage(File core, File metadata) throws IOException
      Description copied from interface: ImageFactory
      Creates a new Image object based on the contents of imageFile and metadata.
      Specified by:
      getImage in interface ImageFactory
      Parameters:
      core - a file with image information, typically a core file
      metadata - 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