Package | Description |
---|---|
org.springframework.core.codec | |
org.springframework.core.io |
Generic abstraction for (file-based) resources, used throughout the framework.
|
org.springframework.core.io.buffer |
Generic abstraction for working with byte buffer implementations.
|
org.springframework.core.io.support |
Support classes for Spring's resource abstraction.
|
org.springframework.core.type.classreading |
Support classes for reading annotation and class-level metadata.
|
Modifier and Type | Method and Description |
---|---|
Resource |
ResourceDecoder.decode(DataBuffer dataBuffer,
ResolvableType elementType,
MimeType mimeType,
Map<String,Object> hints) |
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Flux<Resource> |
ResourceDecoder.decode(org.reactivestreams.Publisher<DataBuffer> inputStream,
ResolvableType elementType,
MimeType mimeType,
Map<String,Object> hints) |
Modifier and Type | Method and Description |
---|---|
protected reactor.core.publisher.Flux<DataBuffer> |
ResourceEncoder.encode(Resource resource,
DataBufferFactory bufferFactory,
ResolvableType type,
MimeType mimeType,
Map<String,Object> hints) |
Modifier and Type | Interface and Description |
---|---|
interface |
ContextResource
Extended interface for a resource that is loaded from an enclosing
'context', e.g.
|
interface |
WritableResource
Extended interface for a resource that supports writing to it.
|
Modifier and Type | Class and Description |
---|---|
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 |
PathResource
|
class |
UrlResource
Resource implementation for java.net.URL locators. |
class |
VfsResource
JBoss VFS based
Resource implementation. |
Modifier and Type | Method and Description |
---|---|
Resource |
Resource.createRelative(String relativePath)
Create a resource relative to this resource.
|
Resource |
FileUrlResource.createRelative(String relativePath) |
Resource |
UrlResource.createRelative(String relativePath)
This implementation creates a
UrlResource , delegating to
UrlResource.createRelativeURL(String) for adapting the relative path. |
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 |
PathResource.createRelative(String relativePath)
This implementation creates a PathResource, applying the given path
relative to the path of the underlying file of this resource descriptor.
|
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 |
VfsResource.createRelative(String relativePath) |
Resource |
DefaultResourceLoader.getResource(String location) |
Resource |
ResourceLoader.getResource(String location)
Return a Resource handle for the specified resource location.
|
protected Resource |
FileSystemResourceLoader.getResourceByPath(String path)
Resolve resource paths as file system paths.
|
protected Resource |
ClassRelativeResourceLoader.getResourceByPath(String path) |
protected Resource |
DefaultResourceLoader.getResourceByPath(String path)
Return a Resource handle for the resource at the given path.
|
Resource |
ProtocolResolver.resolve(String location,
ResourceLoader resourceLoader)
Resolve the given location against the given resource loader
if this implementation's protocol matches.
|
Modifier and Type | Method and Description |
---|---|
<T> Map<Resource,T> |
DefaultResourceLoader.getResourceCache(Class<T> valueType)
Obtain a cache for the given value type, keyed by
Resource . |
Modifier and Type | Method and Description |
---|---|
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.read(Resource resource,
DataBufferFactory bufferFactory,
int bufferSize)
Read the given
Resource into a Flux of DataBuffer s. |
static reactor.core.publisher.Flux<DataBuffer> |
DataBufferUtils.read(Resource resource,
long position,
DataBufferFactory bufferFactory,
int bufferSize)
Read the given
Resource into a Flux of DataBuffer s
starting at the given position. |
Modifier and Type | Method and Description |
---|---|
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:
|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Constructor and Description |
---|
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 . |
ResourcePropertySource(Resource resource)
Create a PropertySource based on Properties loaded from the given resource.
|
ResourcePropertySource(String name,
Resource resource)
Create a PropertySource having the given name based on Properties
loaded from the given encoded resource.
|
ResourceRegion(Resource resource,
long position,
long count)
Create a new
ResourceRegion from a given Resource . |
Modifier and Type | Method and Description |
---|---|
Resource |
MetadataReader.getResource()
Return the resource reference for the class file.
|
Modifier and Type | Method and Description |
---|---|
MetadataReader |
CachingMetadataReaderFactory.getMetadataReader(Resource resource) |
MetadataReader |
SimpleMetadataReaderFactory.getMetadataReader(Resource resource) |
MetadataReader |
MetadataReaderFactory.getMetadataReader(Resource resource)
Obtain a MetadataReader for the given resource.
|