Java URL Value Check isLocal(URL aURL)

Here you can find the source of isLocal(URL aURL)

Description

Returns whether a URL is local.

License

Open Source License

Declaration

public static boolean isLocal(URL aURL) 

Method Source Code


//package com.java2s;

import java.net.*;

public class Main {
    /**//w ww  . ja  va 2s . co  m
     * Returns whether a URL is local.
     */
    public static boolean isLocal(URL aURL) {
        String url = aURL.toExternalForm().toLowerCase();
        return url.startsWith("file:") || url.startsWith("jar:file:");
    }
}

Related

  1. isJarURL(URL url)
  2. isJarURL(URL url)
  3. isJarURL(URL url)
  4. isJBoss5Url(URL fileUrl)
  5. isLegalURL(final String url)
  6. isLocalFile(URL url)
  7. isLocalFile(URL url)
  8. isLocalFile(URL url)
  9. isLocalFile(URL url)