Here you can find the source of isFile(URI uri)
private static boolean isFile(URI uri)
//package com.java2s; import java.net.*; public class Main { private static boolean isFile(URI uri) { return "file".equals(uri.getScheme()) || !uri.isAbsolute(); }/*from w w w.j a v a2 s. co m*/ }