public static boolean isFileURL(URL url){
  String protocol=url.getProtocol();
  return (URL_PROTOCOL_FILE.equals(protocol) || URL_PROTOCOL_VFSFILE.equals(protocol) || URL_PROTOCOL_VFS.equals(protocol));
}

public static boolean isFileURL ( URL url ) { String protocol = url . getProtocol ( ) ; return ( URL_PROTOCOL_FILE . equals ( protocol ) || URL_PROTOCOL_VFSFILE . equals ( protocol ) || URL_PROTOCOL_VFS . equals ( protocol ) ) ; }
determine whether the given url points to a resource in the file system , that is , has protocol " file " , " vfsfile " or " vfs " .
