Here you can find the source of isFile(URL url)
public static boolean isFile(URL url)
//package com.java2s; //License from project: Open Source License import java.net.URL; public class Main { private static final String URL_PROTOCOL_FILE = "file"; public static boolean isFile(URL url) { return url != null && url.getProtocol().equals(URL_PROTOCOL_FILE); }// w w w . jav a2 s. c o m }