org.carrot2.util.resource
Class ClassResource
java.lang.Object
org.carrot2.util.resource.URLResource
org.carrot2.util.resource.ClassResource
- All Implemented Interfaces:
- IResource
public final class ClassResource
- extends URLResource
A resource relative to a class. This resource provider caches the content of returned
resources and closes the stream handle in open().
|
Method Summary |
InputStream |
open()
Override the default open-from-URL method so that we don't lock the source JAR. |
ClassResource
public ClassResource(Class<?> clazz,
String resource)
open
public InputStream open()
throws IOException
- Override the default open-from-URL method so that we don't lock the source JAR.
- Specified by:
open in interface IResource- Overrides:
open in class URLResource
- Throws:
IOException
Copyright (c) Dawid Weiss, Stanislaw Osinski