Here you can find the source of isFile(URL url)
public static boolean isFile(URL url)
//package com.java2s; //License from project: Apache License import java.net.URL; public class Main { public static boolean isFile(URL url) { return (url != null) && ((url.getProtocol().equals("file")) || (url.getProtocol().equals("vfsfile"))); }//from ww w . j a v a2 s. co m }