Here you can find the source of getResourceStream(final String resourcePath)
Parameter | Description |
---|---|
resourcePath | the path of the local resource. |
public static InputStream getResourceStream(final String resourcePath)
//package com.java2s; //License from project: Open Source License import java.io.InputStream; public class Main { /**/* ww w. jav a2s . com*/ * Gets the {@link InputStream} of a local resource. * * @param resourcePath the path of the local resource. * @return the {@link InputStream} for reading the local resource */ public static InputStream getResourceStream(final String resourcePath) { return ClassLoader.class.getResourceAsStream(resourcePath); } }