Class FileUtils



  • public class FileUtils
    extends Object
    Some utilities for files.
    • Method Detail

      • getExtension

        public static String getExtension​(File file)
        Gets the extension of the given file or "png" if the file has no extension.
        Parameters:
        file - The file.
        Returns:
        The extension of the given file.
      • getExtension

        public static String getExtension​(String fileName)
        Gets the extension of the given file name or "png" if the file name has no extension.
        Parameters:
        fileName - The file name.
        Returns:
        The extension of the given file.