Logo Search packages:      
Sourcecode: jamvm version File versions

InputStream java::lang::ClassLoader::getResourceAsStream ( String  name  )  [inline]

Get a resource as stream using this classloader or one of its parents. First calls getResource() and if that returns a URL to the resource then it calls and returns the InputStream given by URL.openStream().

Subclasses should not override this method but should override findResource() which is called by this method.

name the name of the resource relative to this classloader
an InputStream to the resource, or null

Definition at line 649 of file ClassLoader.java.

References getResource().

        URL url = getResource(name);
        if (url == null)
          return null;
        return url.openStream();
    catch (IOException e)
        return null;

Generated by  Doxygen 1.6.0   Back to index