Package io.github.astrapi69.file.modify
Class ModifyFileExtensions
- java.lang.Object
-
- io.github.astrapi69.file.modify.ModifyFileExtensions
-
public final class ModifyFileExtensions extends java.lang.Object
The classModifyFileExtensions
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 filestatic 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 filestatic 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 filestatic 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.
-
-
-
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 pathcharsetOfOutputFile
- the charset of output filemodifier
- 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 pathmodifier
- 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 pathoutFilePath
- the out file pathcharsetOfOutputFile
- the charset of output filemodifier
- 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 pathoutFilePath
- the out file pathmodifier
- the modifier BiFunction- Throws:
java.io.IOException
- Signals that an I/O exception has occurred.
-
-