Class FileStylingDefinition

java.lang.Object
ch.so.agi.gretl.util.FileStylingDefinition

public class FileStylingDefinition extends Object
The FileStylingDefinition class checks if a given file is encoded in UTF-8 and has no Byte-Order-Mark (BOM)
  • Method Details

    • checkForUtf8

      public static void checkForUtf8(File inputfile) throws Exception
      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

      public static void checkForBOMInFile(File inputfile) throws Exception
      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