| 程序包 | 说明 |
|---|---|
| cn.sexycode.util.core.cls | |
| cn.sexycode.util.core.io | |
| cn.sexycode.util.core.io.support |
| 限定符和类型 | 方法和说明 |
|---|---|
Resource |
SimpleMetadataReader.getResource() |
Resource |
MetadataReader.getResource()
Return the resource reference for the class file.
|
| 限定符和类型 | 方法和说明 |
|---|---|
MetadataReader |
SimpleMetadataReaderFactory.getMetadataReader(Resource resource) |
MetadataReader |
MetadataReaderFactory.getMetadataReader(Resource resource)
Obtain a MetadataReader for the given resource.
|
| 构造器和说明 |
|---|
SimpleMetadataReader(Resource resource,
ClassLoader classLoader) |
| 限定符和类型 | 接口和说明 |
|---|---|
interface |
ContextResource
Extended interface for a resource that is loaded from an enclosing
'context', e.g. from a
javax.servlet.ServletContext 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. |
protected static class |
DefaultResourceLoader.ClassPathContextResource
ClassPathResource that explicitly expresses a context-relative path
through implementing the ContextResource interface.
|
class |
DescriptiveResource
Simple
Resource implementation that holds a resource description
but does not point to an actually readable resource. |
class |
FileSystemResource
|
class |
FileUrlResource
Subclass of
UrlResource which assumes file resolution, to the degree
of implementing the WritableResource interface for it. |
class |
InputStreamResource
Resource implementation for a given InputStream. |
class |
UrlResource
Resource implementation for java.net.URL locators. |
class |
VfsResource
JBoss VFS based
Resource implementation. |
| 限定符和类型 | 方法和说明 |
|---|---|
Resource |
VfsResource.createRelative(String relativePath) |
Resource |
UrlResource.createRelative(String relativePath)
This implementation creates a
UrlResource, delegating to
UrlResource.createRelativeURL(String) for adapting the relative path. |
Resource |
Resource.createRelative(String relativePath)
Create a resource relative to this resource.
|
Resource |
FileUrlResource.createRelative(String relativePath) |
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 |
DefaultResourceLoader.ClassPathContextResource.createRelative(String relativePath) |
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.
|
Resource |
ResourceLoader.getResource(String location)
Return a Resource handle for the specified resource location.
|
Resource |
DefaultResourceLoader.getResource(String 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) |
Resource |
ProtocolResolver.resolve(String location,
ResourceLoader resourceLoader)
Resolve the given location against the given resource loader
if this implementation's protocol matches.
|
| 限定符和类型 | 方法和说明 |
|---|---|
<T> Map<Resource,T> |
DefaultResourceLoader.getResourceCache(Class<T> valueType)
Obtain a cache for the given value type, keyed by
Resource. |
| 限定符和类型 | 方法和说明 |
|---|---|
protected Resource |
PathMatchingResourcePatternResolver.convertClassLoaderURL(URL url)
Convert the given URL as returned from the ClassLoader into a
Resource. |
protected Resource[] |
PathMatchingResourcePatternResolver.findAllClassPathResources(String location)
Find all class location resources with the given location via the ClassLoader.
|
Resource |
LocalizedResourceHelper.findLocalizedResource(String name,
String extension,
Locale locale)
Find the most specific localized resource for the given name,
extension and locale:
The file will be searched with locations in the following order,
similar to
java.util.ResourceBundle's search order:
[name]_[language]_[country]_[variant][extension]
[name]_[language]_[country][extension]
[name]_[language][extension]
[name][extension]
If none of the specific files can be found, a resource
descriptor for the default location will be returned. |
protected Resource[] |
PathMatchingResourcePatternResolver.findPathMatchingResources(String locationPattern)
Find all resources that match the given location pattern via the
Ant-style PathMatcher.
|
Resource |
ResourceRegion.getResource()
Return the underlying
Resource for this ResourceRegion. |
Resource |
EncodedResource.getResource()
Return the
Resource held by this EncodedResource. |
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.doFindAllClassPathResources(String path)
Find all class location resources with the given path via the ClassLoader.
|
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,
URL rootDirURL,
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,
URL rootDirURL,
String subPattern)
Find all resources in jar files that match the given location pattern
via the Ant-style PathMatcher.
|
static void |
PropertiesLoaderUtils.fillProperties(Properties props,
Resource resource)
Fill the given properties from the given resource (in ISO-8859-1 encoding).
|
protected boolean |
PathMatchingResourcePatternResolver.isJarResource(Resource resource)
Return whether the given resource handle indicates a jar resource
that the
doFindPathMatchingJarResources method can handle. |
static Properties |
PropertiesLoaderUtils.loadProperties(Resource resource)
Load properties from the given resource (in ISO-8859-1 encoding).
|
protected Resource |
PathMatchingResourcePatternResolver.resolveRootDirResource(Resource original)
Resolve the specified resource for path matching.
|
void |
PropertiesLoaderSupport.setLocation(Resource location)
Set a location of a properties file to be loaded.
|
void |
PropertiesLoaderSupport.setLocations(Resource... locations)
Set locations of properties files to be loaded.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
PathMatchingResourcePatternResolver.addAllClassLoaderJarRoots(ClassLoader classLoader,
Set<Resource> result)
Search all
URLClassLoader URLs for jar file references and add them to the
given set of resources in the form of pointers to the root of the jar file content. |
protected void |
PathMatchingResourcePatternResolver.addClassPathManifestEntries(Set<Resource> result)
Determine jar file references from the "java.class.path." manifest property and add them
to the given set of resources in the form of pointers to the root of the jar file content.
|
| 构造器和说明 |
|---|
EncodedResource(Resource resource)
Create a new
EncodedResource for the given Resource,
not specifying an explicit encoding or Charset. |
EncodedResource(Resource resource,
Charset charset)
Create a new
EncodedResource for the given Resource,
using the specified Charset. |
EncodedResource(Resource resource,
String encoding)
Create a new
EncodedResource for the given Resource,
using the specified encoding. |
ResourceRegion(Resource resource,
long position,
long count)
Create a new
ResourceRegion from a given Resource. |
Copyright © 2020. All rights reserved.