Java URL Value Check isFileURL(URL url)

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

Description

is File URL

License

Apache License

Declaration

public static boolean isFileURL(URL url) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.net.URL;

public class Main {
    public static final String URL_PROTOCOL_FILE = "file";
    public static final String URL_PROTOCOL_VFS = "vfs";

    public static boolean isFileURL(URL url) {
        String protocol = url.getProtocol();
        return (URL_PROTOCOL_FILE.equals(protocol) || protocol.startsWith(URL_PROTOCOL_VFS));
    }/*from   www  .j a  v  a2 s .  co  m*/
}

Related

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