程序包 | 说明 |
---|---|
org.jretty.util | |
org.jretty.util.resource |
Based on spring-framework
其中,
1、将Spring的 ResourceUtils,换成了Zollty的 UrlUtils
2、StringUtils.getFilenameFromPath(this.path);
Release description
2015-01-21
Keep synchronization with spring-framework-3.2.13.RELEASE
|
org.jretty.util.resource.support |
限定符和类型 | 方法和说明 |
---|---|
static Resource |
ResourceUtils.getResource(ClassLoader classLoader,
String location) |
static Resource |
ResourceUtils.getResource(ResourceLoader resourceLoader,
String location) |
static Resource |
ResourceUtils.getResource(String location) |
static Resource[] |
ResourceUtils.getResources(String locationPattern,
ResourcePatternResolver resPatternLoader) |
static Resource[] |
ResourceUtils.getResourcesByPathMatchingResolver(String locationPattern) |
static Resource[] |
ResourceUtils.getResourcesByPathMatchingResolver(String locationPattern,
ClassLoader classLoader) |
static Resource[] |
ResourceUtils.getResourcesByPathMatchingResolver(String locationPattern,
ResourceLoader resourceLoader) |
限定符和类型 | 接口和说明 |
---|---|
interface |
ContextResource
Extended interface for a resource that is loaded from an enclosing
'context', e.g. from a
javax.servlet.ServletContext or a
javax.portlet.PortletContext but also from plain classpath paths
or relative file system paths (specified without an explicit prefix,
hence applying relative to the local ResourceLoader 's context). |
interface |
WritableResource
Extended interface for a resource that supports writing to it.
|
限定符和类型 | 类和说明 |
---|---|
class |
AbstractFileResolvingResource
Abstract base class for resources which resolve URLs into File references,
such as
UrlResource or ClassPathResource . |
class |
AbstractResource
Convenience base class for
Resource implementations,
pre-implementing typical behavior. |
class |
ByteArrayResource
Resource implementation for a given byte array. |
class |
ClassPathResource
Resource implementation for class path resources. |
class |
DescriptiveResource
Simple
Resource implementation that holds a resource description
but does not point to an actually readable resource. |
class |
FileSystemContextResource
FileSystemResource that explicitly expresses a context-relative path
through implementing the ContextResource interface.
|
class |
FileSystemResource
Resource implementation for java.io.File handles. |
class |
InputStreamResource
Resource implementation for a given InputStream. |
class |
UrlResource
Resource implementation for java.net.URL locators. |
class |
VfsResource
VFS based
Resource implementation. |
限定符和类型 | 方法和说明 |
---|---|
Resource |
VfsResource.createRelative(String relativePath) |
Resource |
UrlResource.createRelative(String relativePath)
This implementation creates a UrlResource, applying the given path
relative to the path of the underlying URL of this resource descriptor.
|
Resource |
Resource.createRelative(String relativePath)
Create a resource relative to this resource.
|
Resource |
FileSystemResource.createRelative(String relativePath)
This implementation creates a FileSystemResource, applying the given path
relative to the path of the underlying file of this resource descriptor.
|
Resource |
ClassPathResource.createRelative(String relativePath)
This implementation creates a ClassPathResource, applying the given path
relative to the path of the underlying resource of this descriptor.
|
Resource |
AbstractResource.createRelative(String relativePath)
This implementation throws a FileNotFoundException, assuming
that relative resources cannot be created for this resource.
|
static Resource |
FileSystemResourceLoader.getFsResource(String path) |
Resource |
ResourceLoader.getResource(String location)
Return a Resource handle for the specified resource.
|
Resource |
DefaultResourceLoader.getResource(String location)
DefaultResourceLoader取resource的顺序:
判断是否为 classpath URL,例如 classpath:test.dat
判断是否为 标准URL 路径,例如 file:C:/test.dat,http://www.math.com/test.html
交给子类的 getResourceByPath(location) 方法进一步去判断。
|
protected Resource |
FileSystemResourceLoader.getResourceByPath(String path)
Resolve resource paths as file system paths.
|
protected Resource |
DefaultResourceLoader.getResourceByPath(String path)
Return a Resource handle for the resource at the given path.
|
protected Resource |
ClassRelativeResourceLoader.getResourceByPath(String path) |
限定符和类型 | 方法和说明 |
---|---|
protected Resource |
PathMatchingResourcePatternResolver.convertClassLoaderURL(URL url)
Convert the given URL as returned from the ClassLoader into a Resource object.
|
protected Resource[] |
PathMatchingResourcePatternResolver.findAllClassPathResources(String location)
Find all class location resources with the given location via the ClassLoader.
|
protected Resource[] |
PathMatchingResourcePatternResolver.findPathMatchingResources(String locationPattern)
Find all resources that match the given location pattern via the
Ant-style PathMatcher.
|
Resource |
PathMatchingResourcePatternResolver.getResource(String location) |
Resource[] |
ResourcePatternResolver.getResources(String locationPattern)
Resolve the given location pattern into Resource objects.
|
Resource[] |
PathMatchingResourcePatternResolver.getResources(String locationPattern) |
protected Resource |
PathMatchingResourcePatternResolver.resolveRootDirResource(Resource original)
Resolve the specified resource for path matching.
|
限定符和类型 | 方法和说明 |
---|---|
protected Set<Resource> |
PathMatchingResourcePatternResolver.doFindMatchingFileSystemResources(File rootDir,
String subPattern)
Find all resources in the file system that match the given location pattern
via the Ant-style PathMatcher.
|
protected Set<Resource> |
PathMatchingResourcePatternResolver.doFindPathMatchingFileResources(Resource rootDirResource,
String subPattern)
Find all resources in the file system that match the given location pattern
via the Ant-style PathMatcher.
|
protected Set<Resource> |
PathMatchingResourcePatternResolver.doFindPathMatchingJarResources(Resource rootDirResource,
String subPattern)
Find all resources in jar files that match the given location pattern
via the Ant-style PathMatcher.
|
限定符和类型 | 方法和说明 |
---|---|
protected Set<Resource> |
PathMatchingResourcePatternResolver.doFindPathMatchingFileResources(Resource rootDirResource,
String subPattern)
Find all resources in the file system that match the given location pattern
via the Ant-style PathMatcher.
|
protected Set<Resource> |
PathMatchingResourcePatternResolver.doFindPathMatchingJarResources(Resource rootDirResource,
String subPattern)
Find all resources in jar files that match the given location pattern
via the Ant-style PathMatcher.
|
protected boolean |
PathMatchingResourcePatternResolver.isJarResource(Resource resource)
Return whether the given resource handle indicates a jar resource
that the
doFindPathMatchingJarResources method can handle. |
protected Resource |
PathMatchingResourcePatternResolver.resolveRootDirResource(Resource original)
Resolve the specified resource for path matching.
|
Copyright © 2018 jretty-org. All rights reserved.