Here you can find the source of isLocalURL(URL url)
public static boolean isLocalURL(URL url)
//package com.java2s; /**//w ww . ja v a 2 s . c o m * Copyright (c) 2006-2010, Cloudsmith Inc. * The code, documentation and other materials contained herein have been * licensed under the Eclipse Public License - v 1.0 by the copyright holder * listed above, as the Initial Contributor under such license. The text of * such license is available at www.eclipse.org. */ import java.net.URL; public class Main { public static boolean isLocalURL(URL url) { String proto = url.getProtocol(); if (proto.equals("jar") || proto.equals("reference")) //$NON-NLS-1$ //$NON-NLS-2$ { String spec = url.getFile(); int sepIdx = spec.indexOf(':'); if (sepIdx == -1) return false; proto = spec.substring(0, sepIdx); } return "file".equals(proto) || "platform".equals(proto) || proto.startsWith("bundle"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } }