Here you can find the source of getInputStream(String fileName)
private static InputStream getInputStream(String fileName) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.InputStream; public class Main { private static InputStream getInputStream(String fileName) throws IOException { ClassLoader classloader = Thread.currentThread() .getContextClassLoader(); InputStream inputStream = classloader.getResourceAsStream(fileName); return inputStream; }//from ww w . j a v a2 s. co m }