/** * Returns a stream that loads the resources with the given name. A * resource is some data (images, audio, text, etc) that can be accessed by * class code in a way that is independent of the location of the code. * * Resources in a named module are private to that module. This method does * not find resources in named modules. * *
The name of a resource is a /-separated path name that * identifies the resource. * *
The search order is described in the documentation for {@link
* #getResource(String)}.
*
* @apiNote When overriding this method it is recommended that an
* implementation ensures that any delegation is consistent with the {@link
* #getResource(java.lang.String) getResource(String)} method. This should
* ensure that the first element returned by the stream is the same
* resource that the {@code getResource(String)} method would return. If
* {@code IOException} occur getting the next resource element, it must be
* wrapped into an {@code UncheckedIOException}.
*
* @param name
* The resource name
*
* @return An stream of resource {@link java.net.URL URL}
* objects. If no resources could be found, the stream will be
* empty. Resources that the class loader doesn't have access to
* will not be in the stream.
*
* @throws UncheckedIOException
* If I/O errors occur accessing the stream or its elements
*
* @see #findResources(String)
*
* @since 1.9
*/
public Stream The search order is described in the documentation for {@link
* #getSystemResource(String)}.
*
* @param name
* The resource name
*
* @throws UncheckedIOException accessing a stream element
* If I/O errors occur accessing the stream or its elements
*
* @return An stream of resource {@link java.net.URL URL}
* objects. If no resources could be found, the stream will be
* empty. Resources that the class loader doesn't have access to
* will not be in the stream.
*
* @since 1.9
*/
public static Stream