org.webframe.support.driver.resource.jar
Class JarResourceLoader
java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.webframe.support.driver.resource.jar.JarResourceLoader
- All Implemented Interfaces:
- org.springframework.core.io.ResourceLoader
public class JarResourceLoader
- extends org.springframework.core.io.DefaultResourceLoader
jar包中的资源文件加载器
- Version:
- $Id: codetemplates.xml,v 1.1 2009/09/07 08:48:12 Exp $ Create: 2011-4-6 下午04:16:45
- Author:
- 黄国庆
| Fields inherited from interface org.springframework.core.io.ResourceLoader |
CLASSPATH_URL_PREFIX |
| Methods inherited from class org.springframework.core.io.DefaultResourceLoader |
getClassLoader, getResource, setClassLoader |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
jarResource
private JarResource jarResource
jarCon
private JarURLConnection jarCon
entriesPath
private Set<String> entriesPath
jarClass
private Class<?> jarClass
isJarResource
private boolean isJarResource
JarResourceLoader
public JarResourceLoader(Class<?> jarClass)
throws IOException
- Throws:
IOException
JarResourceLoader
public JarResourceLoader(JarURLConnection jarURLConnection)
throws IOException
- Throws:
IOException
getEntriesPath
public Set<String> getEntriesPath()
getEntryFilesByDir
public Set<String> getEntryFilesByDir(String directory,
org.springframework.util.PathMatcher matcher)
getJarURLConnection
public JarURLConnection getJarURLConnection()
getResourceByPath
protected org.springframework.core.io.Resource getResourceByPath(String path)
- Overrides:
getResourceByPath in class org.springframework.core.io.DefaultResourceLoader
hasJarResource
protected boolean hasJarResource()
close
public void close()
throws IOException
- Throws:
IOException
init
private void init(JarURLConnection jarURLConnection)
throws IOException
- Throws:
IOException
Copyright © 2012. All Rights Reserved.