Class FileUtils


  • public class FileUtils
    extends java.lang.Object
    Some utilities for files.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getExtension​(java.io.File file)
      Gets the extension of the given file or "png" if the file has no extension.
      static java.lang.String getExtension​(java.lang.String fileName)
      Gets the extension of the given file name or "png" if the file name has no extension.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getExtension

        public static java.lang.String getExtension​(java.io.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 java.lang.String getExtension​(java.lang.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.