net.sourceforge.pmd.util

## Class ResourceLoader

- java.lang.Object
- - net.sourceforge.pmd.util.ResourceLoader

-     public final class ResourceLoader
      extends Object

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static InputStream` | `loadResourceAsStream(String name)` Method to find a file, first by finding it as a file (either by the absolute or relative path), then as a URL, and then finally seeing if it is on the classpath.
    `static InputStream` | `loadResourceAsStream(String name, ClassLoader loader)` Uses the ClassLoader passed in to attempt to load the resource if it's not a File or a URL

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

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

- - ### Method Detail

    - #### loadResourceAsStream

          public static InputStream loadResourceAsStream(String name)
                                                  throws RuleSetNotFoundException

      Method to find a file, first by finding it as a file (either by the absolute or relative path), then as a URL, and then finally seeing if it is on the classpath.
      Parameters:
        `name` - String
      Returns:
        InputStream
      Throws:
        `RuleSetNotFoundException`

    - #### loadResourceAsStream

          public static InputStream loadResourceAsStream(String name,
                                         ClassLoader loader)
                                                  throws RuleSetNotFoundException

      Uses the ClassLoader passed in to attempt to load the resource if it's not a File or a URL
      Parameters:
        `name` - String
        `loader` - ClassLoader
      Returns:
        InputStream
      Throws:
        `RuleSetNotFoundException`

Copyright © 2002-2013 InfoEther. All Rights Reserved.