org.carrot2.util.resources
Class ClassLoaderResource

java.lang.Object
  extended by org.carrot2.util.resources.URLResource
      extended by org.carrot2.util.resources.ClassLoaderResource
All Implemented Interfaces:
Resource

public final class ClassLoaderResource
extends URLResource

A resource loaded using a class loader. This resource provider caches the content of returned resources and closes the stream handle in open().


Constructor Summary
ClassLoaderResource(ClassLoader cl, String resource)
           
 
Method Summary
 InputStream open()
          Open an input stream to the resource.
 
Methods inherited from class org.carrot2.util.resources.URLResource
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassLoaderResource

public ClassLoaderResource(ClassLoader cl,
                           String resource)
Method Detail

open

public InputStream open()
                 throws IOException
Description copied from interface: Resource
Open an input stream to the resource.

Specified by:
open in interface Resource
Overrides:
open in class URLResource
Throws:
IOException


Copyright (c) Dawid Weiss, Stanislaw Osinski