Java Resource Load getResource(String name)

Here you can find the source of getResource(String name)

Description

get Resource

License

Apache License

Declaration

public static InputStream getResource(String name) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.InputStream;

public class Main {
    public static InputStream getResource(String name) {
        ClassLoader classloader = Thread.currentThread()
                .getContextClassLoader();
        InputStream is = classloader.getResourceAsStream(name);
        return is;
    }//from  ww w.j  a  v a  2 s .co m
}

Related

  1. getResource(ClassLoader classLoader, final String path)
  2. getResource(final String aResName)
  3. getResource(final String resource)
  4. getResource(String fileName)
  5. getResource(String fileName, int type)
  6. getResource(String path)
  7. getResource(String propertiesPath)
  8. getResource(String uri)
  9. getResourceAbsolutePath(String pluginId, String... path)