Class FilenameUtils


  • public final class FilenameUtils
    extends java.lang.Object
    A class containing utility methods.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getFileExtension​(java.lang.String fileName)
      Returns the file name extension of the file.
      static java.lang.String getFileType​(java.lang.String fileName)
      Returns the type of the file.
      static java.lang.String getNamePart​(java.lang.String name)
      Returns the name of the file without file extension.
      static boolean isArchiveFile​(java.lang.String fileName)
      Returns if the the file is an archive file.
      • Methods inherited from class java.lang.Object

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

      • getFileType

        public static java.lang.String getFileType​(java.lang.String fileName)
        Returns the type of the file.
        Parameters:
        fileName - the file name
        Returns:
        the type of the file
      • isArchiveFile

        public static boolean isArchiveFile​(java.lang.String fileName)
        Returns if the the file is an archive file.
        Parameters:
        fileName - the file name
        Returns:
        the type of the file
      • getNamePart

        public static java.lang.String getNamePart​(java.lang.String name)
        Returns the name of the file without file extension.
        Parameters:
        name - the file name
        Returns:
        the name of the file without file extension
      • getFileExtension

        public static java.lang.String getFileExtension​(java.lang.String fileName)
        Returns the file name extension of the file.
        Parameters:
        fileName - the file name
        Returns:
        the file name extension