Package ch.so.agi.gretl.util
Class FileStylingDefinition
java.lang.Object
ch.so.agi.gretl.util.FileStylingDefinition
The FileStylingDefinition class checks if a given file is encoded in UTF-8
and has no Byte-Order-Mark (BOM)
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckForBOMInFile(File inputfile) Checks if the given file starts with a Byte-Order-Mark (BOM)static voidcheckForUtf8(File inputfile) Checks the given file if it is encoded in UTF-8
-
Method Details
-
checkForUtf8
Checks the given file if it is encoded in UTF-8- Parameters:
inputfile- File- Throws:
Exception- if the File is not encoded in UTF-8 an Exception will be thrown
-
checkForBOMInFile
Checks if the given file starts with a Byte-Order-Mark (BOM)- Parameters:
inputfile- File- Throws:
Exception- if the File holds a BOM an Exception will be thrown
-