Android File Name Get getFileNameFromURL(URL url)

Here you can find the source of getFileNameFromURL(URL url)

Description

get File Name From URL

Declaration

public static String getFileNameFromURL(URL url) 

Method Source Code

//package com.java2s;
import java.net.URL;

public class Main {
    public static String getFileNameFromURL(URL url) {
        String fileName = url.getFile();
        return fileName.substring(fileName.lastIndexOf('/') + 1);
    }//w w w.  j  a  v  a 2  s  .c o  m
}

Related

  1. appendNumberToFilenameIfExists(String fileName, File directory)
  2. getUniqueImageFilename(String prefix)
  3. getFileName()
  4. getFileName(String path)
  5. getFileNameFromURL(String url)
  6. getFileNameOnly(String filename)
  7. getFilenameFromPath(String path)