Android File Extension Name Get getExtension(final String fileName)

Here you can find the source of getExtension(final String fileName)

Description

get Extension

Declaration

public static String getExtension(final String fileName) 

Method Source Code

//package com.java2s;
import java.util.zip.ZipEntry;

public class Main {
    public static String getExtension(final ZipEntry ze) {
        return getExtension(ze.getName());
    }// www.  ja  va2 s .  c  om

    public static String getExtension(final String fileName) {
        return fileName.substring(fileName.lastIndexOf(".") + 1)
                .toLowerCase();
    }
}

Related

  1. isValidFileExtension(String extension)
  2. parseFileExtension(String filename)
  3. parseFileExtension(String filename)
  4. removeExtension(String file)
  5. removeExtension(String s)
  6. getFileExtenSion(File file)
  7. getFileExtension(String fullFilename, Boolean withDot)
  8. getFileExtensionOnly(String filename)