Class TestFileManager


  • @Deprecated
    public class TestFileManager
    extends java.lang.Object
    Deprecated.
    Version:
    $Id$
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String baseFilename
      Deprecated.
       
      private java.lang.StackTraceElement callerInfo
      Deprecated.
       
      private java.lang.Thread cleanupWarning
      Deprecated.
       
      private java.util.List<java.io.File> filesToDelete
      Deprecated.
       
      private java.lang.String fileSuffix
      Deprecated.
       
      static java.lang.String TEMP_DIR_PATH
      Deprecated.
      Temp dir from "java.io.tmpdir" property
      private boolean warnAboutCleanup
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Constructor Description
      TestFileManager​(java.lang.String baseFilename, java.lang.String fileSuffix)
      Deprecated.
      Default constructor
    • Field Detail

      • TEMP_DIR_PATH

        public static final java.lang.String TEMP_DIR_PATH
        Deprecated.
        Temp dir from "java.io.tmpdir" property
      • filesToDelete

        private java.util.List<java.io.File> filesToDelete
        Deprecated.
      • baseFilename

        private final java.lang.String baseFilename
        Deprecated.
      • fileSuffix

        private final java.lang.String fileSuffix
        Deprecated.
      • callerInfo

        private java.lang.StackTraceElement callerInfo
        Deprecated.
      • cleanupWarning

        private java.lang.Thread cleanupWarning
        Deprecated.
      • warnAboutCleanup

        private boolean warnAboutCleanup
        Deprecated.
    • Constructor Detail

      • TestFileManager

        public TestFileManager​(java.lang.String baseFilename,
                               java.lang.String fileSuffix)
        Deprecated.
        Default constructor
        Parameters:
        baseFilename -
        fileSuffix -
    • Method Detail

      • initializeCleanupMonitoring

        private void initializeCleanupMonitoring()
        Deprecated.
      • maybeWarnAboutCleanUp

        protected void maybeWarnAboutCleanUp()
        Deprecated.
      • markForDeletion

        public void markForDeletion​(java.io.File toDelete)
        Deprecated.
        Parameters:
        toDelete -
      • createTempDir

        public java.io.File createTempDir()
        Deprecated.
        Returns:
        a temp dir
      • createTempFile

        public java.io.File createTempFile()
                                    throws java.io.IOException
        Deprecated.
        Returns:
        a temp file
        Throws:
        java.io.IOException - if any
      • cleanUp

        public void cleanUp()
                     throws java.io.IOException
        Deprecated.
        Throws:
        java.io.IOException - if any
      • assertFileExistence

        public void assertFileExistence​(java.io.File dir,
                                        java.lang.String filename,
                                        boolean shouldExist)
        Deprecated.
        Parameters:
        dir -
        filename -
        shouldExist -
      • assertFileContents

        public void assertFileContents​(java.io.File dir,
                                       java.lang.String filename,
                                       java.lang.String contentsTest)
                                throws java.io.IOException
        Deprecated.
        Parameters:
        dir -
        filename -
        contentsTest -
        Throws:
        java.io.IOException - if any
      • createFile

        public java.io.File createFile​(java.io.File dir,
                                       java.lang.String filename,
                                       java.lang.String contents)
                                throws java.io.IOException
        Deprecated.
        Parameters:
        dir -
        filename -
        contents -
        Returns:
        Throws:
        java.io.IOException - if any
      • getFileContents

        public java.lang.String getFileContents​(java.io.File file)
                                         throws java.io.IOException
        Deprecated.
        Parameters:
        file -
        Returns:
        Throws:
        java.io.IOException - if any
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Deprecated.
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • createFile

        public java.io.File createFile​(java.lang.String filename,
                                       java.lang.String content)
                                throws java.io.IOException
        Deprecated.
        Parameters:
        filename -
        content -
        Returns:
        Throws:
        java.io.IOException - if any