Java URL Value Check isFileURL(URL url)

Here you can find the source of isFileURL(URL url)

Description

Returns true if specified URL is a file: URL, otherwise returns false

License

Open Source License

Declaration

public static boolean isFileURL(URL url) 

Method Source Code

//package com.java2s;

import java.net.URL;

public class Main {
    /**/*from   ww w  .j av a 2  s  . c  o  m*/
     * Returns <code>true</code> if specified URL is a <tt>file:</tt> URL,
     * otherwise returns <code>false</code>
     */
    public static boolean isFileURL(URL url) {
        return "file".equals(url.getProtocol());
    }
}

Related

  1. isFileInJar(URL resource)
  2. isFileResource(URL resource)
  3. isFileSpecified(URL url)
  4. isFileURL(String path)
  5. isFileURL(URL repositoryURL)
  6. isFileURL(URL url)
  7. isFileURL(URL url)
  8. isFileURL(URL url)
  9. isFileUrl(URL url)