org.webframe.support.driver.resource.jar
Class JarResourceLoader

java.lang.Object
  extended by org.springframework.core.io.DefaultResourceLoader
      extended by 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:
黄国庆

Field Summary
private  Set<String> entriesPath
           
private  boolean isJarResource
           
private  Class<?> jarClass
           
private  JarURLConnection jarCon
           
private  JarResource jarResource
           
 
Fields inherited from interface org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIX
 
Constructor Summary
JarResourceLoader(Class<?> jarClass)
           
JarResourceLoader(JarURLConnection jarURLConnection)
           
 
Method Summary
 void close()
           
 Set<String> getEntriesPath()
           
 Set<String> getEntryFilesByDir(String directory, org.springframework.util.PathMatcher matcher)
           
 JarURLConnection getJarURLConnection()
           
protected  org.springframework.core.io.Resource getResourceByPath(String path)
           
protected  boolean hasJarResource()
           
private  void init(JarURLConnection jarURLConnection)
           
 
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
 

Field Detail

jarResource

private JarResource jarResource

jarCon

private JarURLConnection jarCon

entriesPath

private Set<String> entriesPath

jarClass

private Class<?> jarClass

isJarResource

private boolean isJarResource
Constructor Detail

JarResourceLoader

public JarResourceLoader(Class<?> jarClass)
                  throws IOException
Throws:
IOException

JarResourceLoader

public JarResourceLoader(JarURLConnection jarURLConnection)
                  throws IOException
Throws:
IOException
Method Detail

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.