Java File Extension Name Get fileExtension(String path)

Here you can find the source of fileExtension(String path)

Description

file Extension

License

LGPL

Declaration

public static String fileExtension(String path) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static String fileExtension(String path) {
        int token = path.lastIndexOf(".");
        String ext = path.substring(token + 1, path.length()).toLowerCase();
        return ext;
    }/*from  w ww  . j ava 2  s.c om*/
}

Related

  1. extractExtensions(String fileName)
  2. fileExt(String name)
  3. fileExt(String url)
  4. fileExtension(CharSequence path)
  5. fileExtension(String filename)
  6. getFileExtension(File _file)
  7. getFileExtension(File f)
  8. getFileExtension(File f)
  9. getFileExtension(File f)