Class FileEditor


  • public class FileEditor
    extends Object
    Class that provides functionality to match the "lines" with specified pattern and remove them from the specified file.
    • Constructor Detail

      • FileEditor

        public FileEditor​(String fileName)
    • Method Detail

      • deleteLines

        public boolean deleteLines​(Set matchPatterns)
                            throws Exception
        Parameters:
        matchPatterns - a Set of DeletePatterns
        Returns:
        true if all the patterns were found and deleted. False if some patterns were not found. In such cases no changes are made to the file.
        Throws:
        Exception