public InputStream getResourceAsStream (String name)

Returns an input stream for reading the specified resource.

The search order is described in the documentation for getResource(String).

Resources in named modules are subject to the encapsulation rules specified by Module.getResourceAsStream. Additionally, and except for the special case where the resource has a name ending with " .class", this method will only find resources in packages of named modules when the package is Module.isOpen(String) unconditionally.

Parameters:
name     The resource name

Returns:  An input stream for reading the resource; null if the resource could not be found, the resource is in a package that is not opened unconditionally, or access to the resource is denied by the security manager.

Exceptions:
NullPointerException    If name is null

Since:  1.1

@revised 9
@spec JPMS