Package org.codehaus.groovy.tools.groovydoc

# Class ClasspathResourceManager

java.lang.Object
org.codehaus.groovy.tools.groovydoc.ClasspathResourceManager

All Implemented Interfaces:
  `ResourceManager`

public class ClasspathResourceManager extends Object implements ResourceManager
Loads documentation resources from the classpath.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClasspathResourceManager()`
  Creates a resource manager backed by this class's class loader.
  `ClasspathResourceManager(ClassLoader classLoader)`
  Creates a resource manager backed by the supplied class loader.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `InputStream`
  `getInputStream(String resourceName)`
  Opens the named resource as an input stream.
  `Reader`
  `getReader(String resourceName)`
  Returns a reader for the named resource.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ClasspathResourceManager

    public ClasspathResourceManager()
    Creates a resource manager backed by this class's class loader.

  - ### ClasspathResourceManager

    public ClasspathResourceManager(ClassLoader classLoader)
    Creates a resource manager backed by the supplied class loader.
    Parameters:
      `classLoader` - the class loader to use for resource lookups

- ## Method Details

  - ### getInputStream

    public InputStream getInputStream(String resourceName)
    Opens the named resource as an input stream.
    Parameters:
      `resourceName` - the classpath resource to load
    Returns:
      the resource stream, or `null` if the resource does not exist

  - ### getReader

    public Reader getReader(String resourceName) throws IOException
    Returns a reader for the named resource.
    Specified by:
      `getReader` in interface `ResourceManager`
    Parameters:
      `resourceName` - the resource to open
    Returns:
      a reader for the resource
    Throws:
      `IOException` - if the resource cannot be opened