Android File Extension Name Get getFileExtension(String fileName)

Here you can find the source of getFileExtension(String fileName)

Description

get File Extension

Declaration

public static String getFileExtension(String fileName) 

Method Source Code

//package com.java2s;

public class Main {
    public static String getFileExtension(String fileName) {
        int index = fileName.lastIndexOf(".");
        if (index == -1)
            return null;
        return fileName.substring(index + 1);
    }/*from  w  w  w.ja va2  s  . c  o m*/
}

Related

  1. getExtensionName(String fileName)
  2. getFileEx(String filePath)
  3. getFileExt(String fileFullName)
  4. getFileExtByFileName(String fileName)
  5. getFileExtension(String file)
  6. getFileExtension(String filename)
  7. getFileExtension(String filename, String defExt)
  8. getFileExtensionFromName(String filename)
  9. getFileExtensionFromSource(byte[] picHeader)