public final class ClasspathResource
extends java.lang.Object
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
Modifier and Type | Method | Description |
---|---|---|
static ClasspathResource |
getInstance() |
Retrieve the singleton instance of this class.
|
java.util.List |
listResourcesOfMimeType(java.lang.String mimeType) |
Retrieve a list of resources known to have the given mime-type.
|
public static ClasspathResource getInstance()
public java.util.List listResourcesOfMimeType(java.lang.String mimeType)
mimeType
- the mime-type to search for.Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.