Here you can find the source of getResource(final String aResName)
Parameter | Description |
---|---|
aResName | The resource to fetch. |
public static InputStream getResource(final String aResName)
//package com.java2s; //License from project: BSD License import java.io.InputStream; public class Main { /**//from w ww .ja v a2 s. c o m * Loads a resource from the classpath. * * @param aResName * The resource to fetch. * @return A handle for the resource or null if the resource is not found. */ public static InputStream getResource(final String aResName) { return Thread.currentThread().getContextClassLoader().getResourceAsStream(aResName); } }