Here you can find the source of isFile(final URL url)
url
is a file.
Parameter | Description |
---|---|
url | the URL to check. |
public static boolean isFile(final URL url)
//package com.java2s; //License from project: BSD License import java.io.File; import java.net.URL; public class Main { /**//from w ww . java2 s . c om * Indicates whether or not the given <code>url</code> is a file. * * @param url the URL to check. * @return true/false */ public static boolean isFile(final URL url) { return url != null && new File(url.getFile()).isFile(); } }