Class ModifyFileExtensions


  • public final class ModifyFileExtensions
    extends java.lang.Object
    The class ModifyFileExtensions provides methods for modifying files
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void modifyFile​(java.nio.file.Path inFilePath, FileChangeable modifier)
      Modifies the input file line by line and writes the modification in the same file
      static void modifyFile​(java.nio.file.Path inFilePath, java.nio.charset.Charset charsetOfOutputFile, FileChangeable modifier)
      Modifies the input file line by line and writes the modification in the same file
      static void modifyFile​(java.nio.file.Path inFilePath, java.nio.file.Path outFilePath, FileChangeable modifier)
      Modifies the input file line by line and writes the modification in the new output file
      static void modifyFile​(java.nio.file.Path inFilePath, java.nio.file.Path outFilePath, java.nio.charset.Charset charsetOfOutputFile, FileChangeable modifier)
      Modifies the input file line by line and writes the modification in the new output file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • modifyFile

        public static void modifyFile​(java.nio.file.Path inFilePath,
                                      java.nio.charset.Charset charsetOfOutputFile,
                                      FileChangeable modifier)
                               throws java.io.IOException
        Modifies the input file line by line and writes the modification in the same file
        Parameters:
        inFilePath - the in file path
        charsetOfOutputFile - the charset of output file
        modifier - the modifier BiFunction
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
      • modifyFile

        public static void modifyFile​(java.nio.file.Path inFilePath,
                                      FileChangeable modifier)
                               throws java.io.IOException
        Modifies the input file line by line and writes the modification in the same file
        Parameters:
        inFilePath - the in file path
        modifier - the modifier BiFunction
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
      • modifyFile

        public static void modifyFile​(java.nio.file.Path inFilePath,
                                      java.nio.file.Path outFilePath,
                                      java.nio.charset.Charset charsetOfOutputFile,
                                      FileChangeable modifier)
                               throws java.io.IOException
        Modifies the input file line by line and writes the modification in the new output file.
        Parameters:
        inFilePath - the in file path
        outFilePath - the out file path
        charsetOfOutputFile - the charset of output file
        modifier - the modifier BiFunction
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.
      • modifyFile

        public static void modifyFile​(java.nio.file.Path inFilePath,
                                      java.nio.file.Path outFilePath,
                                      FileChangeable modifier)
                               throws java.io.IOException
        Modifies the input file line by line and writes the modification in the new output file
        Parameters:
        inFilePath - the in file path
        outFilePath - the out file path
        modifier - the modifier BiFunction
        Throws:
        java.io.IOException - Signals that an I/O exception has occurred.