public class PropertiesNormalizer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.Map<java.lang.Character,java.lang.String> |
INVALID_CHARACTERS
The invalid characters.
|
| Constructor and Description |
|---|
PropertiesNormalizer() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Collection<java.io.File> |
findPropertiesFilesWithInvalidCharacters(java.io.File rootDir)
Finds properties files that contains invalid characters and adds them to the collection from
the given directory recursively.
|
static void |
normalizeProperties(java.lang.String path)
Replaces all occurrences from invalid characters with utf8 characters for the given path from
the properties file and creates a backup file for comparisons if necessary.
|
public static java.util.Map<java.lang.Character,java.lang.String> INVALID_CHARACTERS
public static java.util.Collection<java.io.File> findPropertiesFilesWithInvalidCharacters(java.io.File rootDir)
throws java.io.IOException
rootDir - the root directory that shall be search for all properties files.java.io.IOException - Signals that an I/O exception has occurred.public static void normalizeProperties(java.lang.String path)
throws java.io.IOException,
de.alpharogroup.file.exceptions.FileIsADirectoryException
path - the path from the properties filejava.io.IOException - Signals that an I/O exception has occurred.de.alpharogroup.file.exceptions.FileIsADirectoryException - is thrown if the given path is a directory.