Module openj9.dtfj

Class FileManager

java.lang.Object
com.ibm.dtfj.utils.file.FileManager
Direct Known Subclasses:
SimpleFileManager

public abstract class FileManager extends Object
Class which manages the files on the local system.
  • Field Details

  • Constructor Details

    • FileManager

      public FileManager()
  • Method Details

    • getImageSources

      public abstract List<ManagedImageSource> getImageSources() throws IOException
      Throws:
      IOException
    • getStream

      public abstract ImageInputStream getStream() throws IOException
      Gets a stream for the file which is being managed, this could be an archive file or a normal file. If this is a compressed file then the stream returned will be a 'raw' stream onto file itself.
      Returns:
      Throws:
      IOException
    • createTempDir

      public static File createTempDir(File parent) throws IOException
      Creates a unique temporary directory under the specified parent
      Parameters:
      parent -
      Returns:
      Throws:
      IOException
    • fileExists

      public static boolean fileExists(File file)
      A platform aware file existence checker that allows for MVS datasets on z/OS
      Parameters:
      file - the file to check
      Returns:
      true if the file exists, or the check cannot be performed in which case the default response of true is returned
    • getManager

      public static FileManager getManager(File file)
      Factory method for getting the correct manager to deal with the supplied file
      Parameters:
      file -
      Returns:
    • isArchive

      public static boolean isArchive(File file)
    • getJavaCoreNameFromPHD

      protected String[] getJavaCoreNameFromPHD(String name)
      Generate a list of possible javacore names from a given phd name.
      Parameters:
      name - the heap dump
      Returns:
      candidate javacore names
    • genJavacoreName

      protected String genJavacoreName(String[] s, int inc, int componentToInc)