Uses of Interface
org.springframework.core.io.Resource
Package
Description
Support for registering the need for reflection, resources, java
serialization and proxies at runtime.
Generic abstraction for (file-based) resources, used throughout the framework.
Generic abstraction for working with byte buffer implementations.
Support classes for Spring's resource abstraction.
Support classes for reading annotation and class-level metadata.
-
Uses of Resource in org.springframework.aot.hint
Modifier and TypeMethodDescriptionvoid
ResourceHints.registerResource
(Resource resource) Register that the supplied resource should be made available at runtime. -
Uses of Resource in org.springframework.core.codec
Modifier and TypeMethodDescriptionResourceDecoder.decode
(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String, Object> hints) Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<Resource>
ResourceDecoder.decode
(Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String, Object> hints) Modifier and TypeMethodDescriptionprotected reactor.core.publisher.Flux<DataBuffer>
ResourceEncoder.encode
(Resource resource, DataBufferFactory bufferFactory, ResolvableType type, MimeType mimeType, Map<String, Object> hints) -
Uses of Resource in org.springframework.core.io
Modifier and TypeInterfaceDescriptioninterface
Extended interface for a resource that is loaded from an enclosing 'context', e.g.interface
Extended interface for a resource that supports writing to it.Modifier and TypeClassDescriptionclass
Abstract base class for resources which resolve URLs into File references, such asUrlResource
orClassPathResource
.class
Convenience base class forResource
implementations, pre-implementing typical behavior.class
Resource
implementation for a given byte array.class
Resource
implementation for class path resources.protected static class
ClassPathResource that explicitly expresses a context-relative path through implementing the ContextResource interface.class
SimpleResource
implementation that holds a resource description but does not point to an actually readable resource.class
class
Subclass ofUrlResource
which assumes file resolution, to the degree of implementing theWritableResource
interface for it.class
Resource
implementation for a givenInputStream
.class
class
Resource
implementation forjava.net.URL
locators.class
JBoss VFS basedResource
implementation.Modifier and TypeMethodDescriptionAbstractResource.createRelative
(String relativePath) This implementation throws a FileNotFoundException, assuming that relative resources cannot be created for this resource.ClassPathResource.createRelative
(String relativePath) This implementation creates aClassPathResource
, applying the given path relative to the path used to create this descriptor.DefaultResourceLoader.ClassPathContextResource.createRelative
(String relativePath) 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.FileUrlResource.createRelative
(String relativePath) 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.createRelative
(String relativePath) Create a resource relative to this resource.UrlResource.createRelative
(String relativePath) This implementation creates aUrlResource
, delegating toUrlResource.createRelativeURL(String)
for adapting the relative path.VfsResource.createRelative
(String relativePath) DefaultResourceLoader.getResource
(String location) ResourceLoader.getResource
(String location) Return aResource
handle for the specified resource location.protected Resource
ClassRelativeResourceLoader.getResourceByPath
(String path) protected Resource
DefaultResourceLoader.getResourceByPath
(String path) Return a Resource handle for the resource at the given path.protected Resource
FileSystemResourceLoader.getResourceByPath
(String path) Resolve resource paths as file system paths.ProtocolResolver.resolve
(String location, ResourceLoader resourceLoader) Resolve the given location against the given resource loader if this implementation's protocol matches.Modifier and TypeMethodDescriptionDefaultResourceLoader.getResourceCache
(Class<T> valueType) Obtain a cache for the given value type, keyed byResource
. -
Uses of Resource in org.springframework.core.io.buffer
Modifier and TypeMethodDescriptionstatic reactor.core.publisher.Flux<DataBuffer>
DataBufferUtils.read
(Resource resource, long position, DataBufferFactory bufferFactory, int bufferSize) Read the givenResource
into aFlux
ofDataBuffer
s starting at the given position.static reactor.core.publisher.Flux<DataBuffer>
DataBufferUtils.read
(Resource resource, DataBufferFactory bufferFactory, int bufferSize) Read the givenResource
into aFlux
ofDataBuffer
s. -
Uses of Resource in org.springframework.core.io.support
Modifier and TypeMethodDescriptionprotected Resource
PathMatchingResourcePatternResolver.convertClassLoaderURL
(URL url) Convert the given URL as returned from the ClassLoader into aResource
, applying to path lookups without a pattern (PathMatchingResourcePatternResolver.findAllClassPathResources(java.lang.String)
).protected Resource[]
PathMatchingResourcePatternResolver.findAllClassPathResources
(String location) Find all class location resources with the given location via the ClassLoader.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.final Resource
EncodedResource.getResource()
Return theResource
held by thisEncodedResource
.PathMatchingResourcePatternResolver.getResource
(String location) ResourceRegion.getResource()
Return the underlyingResource
for thisResourceRegion
.Resource[]
PathMatchingResourcePatternResolver.getResources
(String locationPattern) Resource[]
ResourcePatternResolver.getResources
(String locationPattern) Resolve the given location pattern intoResource
objects.protected Resource
PathMatchingResourcePatternResolver.resolveRootDirResource
(Resource original) Resolve the specified resource for path matching.Modifier and TypeMethodDescriptionPathMatchingResourcePatternResolver.doFindAllClassPathResources
(String path) Find all class location resources with the given path via the ClassLoader.PathMatchingResourcePatternResolver.doFindPathMatchingFileResources
(Resource rootDirResource, String subPattern) Find all resources in the file system of the supplied root directory that match the given location sub pattern via the Ant-style PathMatcher.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.PathMatchingResourcePatternResolver.findAllModulePathResources
(String locationPattern) Resolve the given location pattern intoResource
objects for all matching resources found in the module path.Modifier and TypeMethodDescriptionPathMatchingResourcePatternResolver.doFindPathMatchingFileResources
(Resource rootDirResource, String subPattern) Find all resources in the file system of the supplied root directory that match the given location sub pattern via the Ant-style PathMatcher.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 thePathMatchingResourcePatternResolver.doFindPathMatchingJarResources(org.springframework.core.io.Resource, java.net.URL, java.lang.String)
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 TypeMethodDescriptionprotected void
PathMatchingResourcePatternResolver.addAllClassLoaderJarRoots
(ClassLoader classLoader, Set<Resource> result) Search allURLClassLoader
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.ModifierConstructorDescriptionEncodedResource
(Resource resource) Create a newEncodedResource
for the givenResource
, not specifying an explicit encoding orCharset
.EncodedResource
(Resource resource, String encoding) Create a newEncodedResource
for the givenResource
, using the specifiedencoding
.EncodedResource
(Resource resource, Charset charset) Create a newEncodedResource
for the givenResource
, using the specifiedCharset
.ResourcePropertySource
(String name, Resource resource) Create a PropertySource having the given name based on Properties loaded from the given encoded resource.ResourcePropertySource
(Resource resource) Create a PropertySource based on Properties loaded from the given resource.ResourceRegion
(Resource resource, long position, long count) Create a newResourceRegion
from a givenResource
. -
Uses of Resource in org.springframework.core.type.classreading
Modifier and TypeMethodDescriptionMetadataReader.getResource()
Return the resource reference for the class file.Modifier and TypeMethodDescriptionCachingMetadataReaderFactory.getMetadataReader
(Resource resource) MetadataReaderFactory.getMetadataReader
(Resource resource) Obtain a MetadataReader for the given resource.SimpleMetadataReaderFactory.getMetadataReader
(Resource resource)