public abstract class ClassPathUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CLASSPATH_URL_PREFIX
Pseudo URL prefix for loading from the class path: "classpath:"
|
static String |
FILE_URL_PREFIX
URL prefix for loading from the file system: "file:"
|
static String |
JAR_URL_SEPARATOR
Separator between JAR URL and file path within the JAR
|
static String |
URL_PROTOCOL_CODE_SOURCE
URL protocol for an entry from an OC4J jar file: "code-source"
|
static String |
URL_PROTOCOL_FILE
URL protocol for a file in the file system: "file"
|
static String |
URL_PROTOCOL_JAR
URL protocol for an entry from a jar file: "jar"
|
static String |
URL_PROTOCOL_VFS
URL protocol for a JBoss VFS resource: "vfs"
|
static String |
URL_PROTOCOL_VFSZIP
URL protocol for an entry from a JBoss jar file: "vfszip"
|
static String |
URL_PROTOCOL_WSJAR
URL protocol for an entry from a WebSphere jar file: "wsjar"
|
static String |
URL_PROTOCOL_ZIP
URL protocol for an entry from a zip file: "zip"
|
| Modifier and Type | Method and Description |
|---|---|
protected static void |
copyFilePath(URL sourceDirectoryURL,
File destination,
boolean overwrite) |
protected static void |
copyJarPath(URL jarFileURL,
String sourcePath,
File destination,
boolean overwrite) |
static void |
copyPath(ClassLoader loader,
String classPathSource,
File destination) |
static void |
copyPath(ClassLoader loader,
String classPathSource,
File destination,
boolean overwrite) |
static URL |
extractJarFileURL(URL jarUrl) |
static boolean |
isJarURL(URL url) |
public static final String CLASSPATH_URL_PREFIX
public static final String FILE_URL_PREFIX
public static final String URL_PROTOCOL_FILE
public static final String URL_PROTOCOL_JAR
public static final String URL_PROTOCOL_ZIP
public static final String URL_PROTOCOL_VFSZIP
public static final String URL_PROTOCOL_VFS
public static final String URL_PROTOCOL_WSJAR
public static final String URL_PROTOCOL_CODE_SOURCE
public static final String JAR_URL_SEPARATOR
public static void copyPath(ClassLoader loader, String classPathSource, File destination) throws Exception
loader - classPathSource - destination - Exceptionpublic static void copyPath(ClassLoader loader, String classPathSource, File destination, boolean overwrite) throws Exception
loader - classPathSource - destination - overwrite - Exceptionprotected static void copyJarPath(URL jarFileURL, String sourcePath, File destination, boolean overwrite) throws Exception
jarFileURL - sourcePath - destination - overwrite - Exceptionprotected static void copyFilePath(URL sourceDirectoryURL, File destination, boolean overwrite) throws Exception
sourceDirectoryURL - destination - overwrite - Exceptionpublic static boolean isJarURL(URL url)
public static URL extractJarFileURL(URL jarUrl) throws MalformedURLException
MalformedURLExceptionCopyright © 2014-2015 Opoo.org. All Rights Reserved.