接口的使用
cn.taketoday.core.io.Resource
使用Resource的程序包
程序包
说明
Support for registering the need for reflection, resources, java
serialization and proxies at runtime.
Provides core helpers that are not specific to any part of the framework.
Generic abstraction for working with byte buffer implementations.
Support classes for reading annotation and class-level metadata.
Miscellaneous utility classes, such as utilities for working with strings,
classes, collections, reflection, etc.
-
cn.taketoday.aot.hint中Resource的使用
参数类型为Resource的cn.taketoday.aot.hint中的方法修饰符和类型方法说明voidResourceHints.registerResource(Resource resource) Register that the supplied resource should be made available at runtime. -
cn.taketoday.core中Resource的使用
声明为Resource的cn.taketoday.core中的字段参数类型为Resource的cn.taketoday.core中的方法修饰符和类型方法说明private voidYamlProcessor.handleProcessError(Resource resource, IOException ex) private booleanYamlProcessor.process(YamlProcessor.MatchCallback callback, org.yaml.snakeyaml.Yaml yaml, Resource resource) voidYamlProcessor.setResources(Resource... resources) Set locations of YAMLresourcesto be loaded. -
cn.taketoday.core.codec中Resource的使用
修饰符和类型方法说明ResourceDecoder.decode(DataBuffer dataBuffer, ResolvableType elementType, MimeType mimeType, Map<String, Object> hints) 返回变量类型为Resource的类型的cn.taketoday.core.codec中的方法修饰符和类型方法说明reactor.core.publisher.Flux<Resource>ResourceDecoder.decode(org.reactivestreams.Publisher<DataBuffer> inputStream, ResolvableType elementType, MimeType mimeType, Map<String, Object> hints) 参数类型为Resource的cn.taketoday.core.codec中的方法修饰符和类型方法说明private OptionalLongResourceRegionEncoder.contentLength(Resource resource) Determine, if possible, the contentLength of the given resource without reading it.protected reactor.core.publisher.Flux<DataBuffer>ResourceEncoder.encode(Resource resource, DataBufferFactory bufferFactory, ResolvableType type, MimeType mimeType, Map<String, Object> hints) -
cn.taketoday.core.io中Resource的使用
修饰符和类型接口说明interfaceExtended interface for a resource that is loaded from an enclosing 'context', e.g. from ajakarta.servlet.ServletContextbut also from plain classpath paths or relative file system paths (specified without an explicit prefix, hence applying relative to the localResourceLoader's context).interfaceExtended interface for a resource that supports writing to it.修饰符和类型类说明classAbstract base class for resources which resolve URLs into File references, such asUrlResourceorClassPathResource.classConvenience base class forResourceimplementations, pre-implementing typical behavior.classResourceimplementation for a given byte array.classResourceimplementation for class path resources.private static classClassPathResource that explicitly expresses a context-relative path through implementing the ContextResource interface.protected static classClassPathResource that explicitly expresses a context-relative path through implementing the ContextResource interface.classSimpleResourceimplementation that holds a resource description but does not point to an actually readable resource.classprivate static classFileSystemResource that explicitly expresses a context-relative path through implementing the ContextResource interface.classSubclass ofUrlResourcewhich assumes file resolution, to the degree of implementing theWritableResourceinterface for it.classResourceimplementation for a givenInputStream.classResourceimplementation forModuleresolution, performingModuleResource.getInputStream()access viaModule.getResourceAsStream(java.lang.String).classclassThis class implements the Wrapper or Decorator pattern.classResourceimplementation forjava.net.URLlocators.class声明为Resource的cn.taketoday.core.io中的字段修饰符和类型字段说明protected ResourceClassPathResource.delegateprotected ResourceResourceDecorator.delegatestatic final Resource[]Resource.EMPTY_ARRAYprivate Resource[]PropertiesLoaderSupport.locationsprivate final ResourceEncodedResource.resourceprivate final ResourceResourceRegion.resource类型参数类型为Resource的cn.taketoday.core.io中的字段修饰符和类型字段说明private final ConcurrentHashMap<Class<?>,Map<Resource, ?>> DefaultResourceLoader.resourceCaches返回Resource的cn.taketoday.core.io中的方法修饰符和类型方法说明protected ResourcePathMatchingPatternResourceLoader.convertClassLoaderURL(URL url) Convert the given URL as returned from the ClassLoader into aResource.AbstractResource.createRelative(String relativePath) ClassPathResource.createRelative(String relativePath) ClassRelativeResourceLoader.ClassRelativeContextResource.createRelative(String relativePath) DefaultResourceLoader.ClassPathContextResource.createRelative(String relativePath) FileSystemResource.createRelative(String relativePath) ModuleResource.createRelative(String relativePath) PathResource.createRelative(String relativePath) This implementation creates aPathResource, 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.ResourceDecorator.createRelative(String relativePath) final ResourceClassPathResource.getDelegate()ResourceDecorator.getDelegate()final ResourceClassPathResource.getOriginalResource()Get OriginalResourceDefaultResourceLoader.getResource(String location) final ResourceEncodedResource.getResource()Return theResourceheld by thisEncodedResource.PathMatchingPatternResourceLoader.getResource(String location) ResourceLoader.getResource(String location) Return a Resource handle for the specified resource location.ResourceRegion.getResource()Return the underlyingResourcefor thisResourceRegion.protected ResourceClassRelativeResourceLoader.getResourceByPath(String path) protected ResourceDefaultResourceLoader.getResourceByPath(String path) Return a Resource handle for the resource at the given path.protected ResourceFileSystemResourceLoader.getResourceByPath(String path) Resolve resource paths as file system paths.default Resource[]PatternResourceLoader.getResourcesArray(String locationPattern) Resolve the given location pattern intoResourceobjects.Resource[]AbstractResource.list(ResourceFilter filter) Resource[]ClassPathResource.list(ResourceFilter filter) Resource[]FileSystemResource.list(ResourceFilter filter) Resource[]Resource.list(ResourceFilter filter) listResourceunder the directoryResource[]ResourceDecorator.list(ResourceFilter filter) ProtocolResolver.resolve(String location, ResourceLoader resourceLoader) Resolve the given location against the given resource loader if this implementation's protocol matches.返回变量类型为Resource的类型的cn.taketoday.core.io中的方法修饰符和类型方法说明DefaultResourceLoader.getResourceCache(Class<T> valueType) Obtain a cache for the given value type, keyed byResource.PathMatchingPatternResourceLoader.getResources(String locationPattern) PatternResourceLoader.getResources(String locationPattern) Resolve the given location pattern intoResourceobjects.参数类型为Resource的cn.taketoday.core.io中的方法修饰符和类型方法说明voidPerforms this operation on the given argument.booleanTests whether or not the specified abstractResourcename should be included in a name list.protected voidPathMatchingPatternResourceLoader.doFindPathMatchingFileResources(Resource rootDirResource, String subPattern, ResourceConsumer consumer) Find all resources in the file system of the supplied root directory that match the given location sub pattern via the Ant-style PathMatcher.protected voidPathMatchingPatternResourceLoader.doFindPathMatchingJarResources(Resource rootDirResource, URL rootDirURL, String subPattern, ResourceConsumer consumer) Find all resources in jar files that match the given location pattern via the Ant-style PathMatcher.static voidPropertiesUtils.fillProperties(Map properties, Resource resource) static voidPropertiesUtils.fillProperties(Properties props, Resource resource) Fill the given properties from the given resource (in ISO-8859-1 encoding).private static StringResourcePropertySource.getNameForResource(Resource resource) Return the description for the given Resource; if the description is empty, return the class name of the resource plus its identity hash code.protected booleanPathMatchingPatternResourceLoader.isJarResource(Resource resource) Return whether the given resource handle indicates a jar resource that thePathMatchingPatternResourceLoader.doFindPathMatchingJarResources(cn.taketoday.core.io.Resource, java.net.URL, java.lang.String, cn.taketoday.core.io.ResourceConsumer)method can handle.static PropertiesPropertiesUtils.loadProperties(Resource resource) Load properties from the given resource (in ISO-8859-1 encoding).protected voidPathMatchingPatternResourceLoader.rootDirResource(String subPattern, Resource rootDirResource, ResourceConsumer consumer) voidResourceDecorator.setDelegate(Resource delegate) voidPropertiesLoaderSupport.setLocation(Resource location) Set a location of a properties file to be loaded.voidPropertiesLoaderSupport.setLocations(Resource... locations) Set locations of properties files to be loaded.类型变量类型为Resource的cn.taketoday.core.io中的方法参数修饰符和类型方法说明private voidResourceArrayPropertyEditor.scan(String locationPattern, LinkedHashSet<Resource> resources) 参数类型为Resource的cn.taketoday.core.io中的构造器限定符构造器说明EncodedResource(Resource resource) Create a newEncodedResourcefor the givenResource, not specifying an explicit encoding orCharset.EncodedResource(Resource resource, String encoding) Create a newEncodedResourcefor the givenResource, using the specifiedencoding.privateEncodedResource(Resource resource, String encoding, Charset charset) EncodedResource(Resource resource, Charset charset) Create a newEncodedResourcefor the givenResource, using the specifiedCharset.ResourceDecorator(Resource delegate) 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 newResourceRegionfrom a givenResource.WritableResourceDecorator(Resource delegate) -
cn.taketoday.core.io.buffer中Resource的使用
参数类型为Resource的cn.taketoday.core.io.buffer中的方法修饰符和类型方法说明static reactor.core.publisher.Flux<DataBuffer>DataBufferUtils.read(Resource resource, long position, DataBufferFactory bufferFactory, int bufferSize) Read the givenResourceinto aFluxofDataBuffers starting at the given position.static reactor.core.publisher.Flux<DataBuffer>DataBufferUtils.read(Resource resource, DataBufferFactory bufferFactory, int bufferSize) Read the givenResourceinto aFluxofDataBuffers. -
cn.taketoday.core.type.classreading中Resource的使用
类型参数类型为Resource的cn.taketoday.core.type.classreading中的字段修饰符和类型字段说明private final ConcurrentReferenceHashMap<Resource,MetadataReader> ConcurrentReferenceCachingMetadataReaderFactory.cacheprivate Map<Resource,MetadataReader> CachingMetadataReaderFactory.metadataReaderCacheMetadataReader cache: either local or shared at the ResourceLoader level.修饰符和类型方法说明MetadataReader.getResource()Return the resource reference for the class file.SimpleMetadataReader.getResource()修饰符和类型方法说明protected MetadataReaderConcurrentReferenceCachingMetadataReaderFactory.createMetadataReader(Resource resource) Create the meta-data reader.private static ClassReaderSimpleMetadataReader.getClassReader(Resource resource) CachingMetadataReaderFactory.getMetadataReader(Resource resource) ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(Resource resource) MetadataReaderFactory.getMetadataReader(Resource resource) Obtain a MetadataReader for the given resource.SimpleMetadataReaderFactory.getMetadataReader(Resource resource) 类型变量类型为Resource的cn.taketoday.core.type.classreading中的方法参数修饰符和类型方法说明protected booleanCachingMetadataReaderFactory.LocalResourceCache.removeEldestEntry(Map.Entry<Resource, MetadataReader> eldest) 参数类型为Resource的cn.taketoday.core.type.classreading中的构造器 -
cn.taketoday.util中Resource的使用
返回Resource的cn.taketoday.util中的方法修饰符和类型方法说明static ResourceResourceUtils.getResource(File file) GetResourcefrom a filestatic ResourceResourceUtils.getResource(String location) GetResourcewith given locationstatic ResourceResourceUtils.getResource(URL url) static Resource[]ResourceUtils.getResources(String pathPattern) Resolve the given location pattern into Resource objects.static Resource[]ResourceUtils.getResources(String pathPattern, ClassLoader classLoader) Resolve the given location pattern into Resource objects.参数类型为Resource的cn.taketoday.util中的方法