This class searches for content entries in all META-INF/MANIFEST.MF files. It will find files with a given Content-Type: attribute. This allows to add arbitrary resources by content-type just by creating a JAR wrapper and adding them to the classpath.
Example:
Name: test.txt Content-Type: text/plain
Supports resolution as java.io.File
if the class path resource resides in the file system, but not for resources in a JAR. Always supports resolution as URL.
@author Juergen Hoeller
@since 28.12.2003
@see java.lang.ClassLoader#getResourceAsStream(String)
@see java.lang.Class#getResourceAsStream(String)
Supports resolution as {@code java.io.File} if the class pathresource resides in the file system, but not for resources in a JAR. Always supports resolution as URL. @author Juergen Hoeller @author Sam Brannen @see ClassLoader#getResourceAsStream(String) @see Class#getResourceAsStream(String) Code copied from Spring source. Modifications made (mostly removal of methods) by Per Wendel.
|
|
|
|
|
|