Java Resource Load getResourceAsStream(Class clazz, String resource)

Here you can find the source of getResourceAsStream(Class clazz, String resource)

Description

get Resource As Stream

License

Apache License

Declaration

public static InputStream getResourceAsStream(Class<?> clazz,
            String resource) 

Method Source Code

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

import java.io.InputStream;

public class Main {
    public static InputStream getResourceAsStream(Class<?> clazz,
            String resource) {/*from   w  w  w. j av  a 2 s . c o m*/
        return clazz == null ? ClassLoader
                .getSystemResourceAsStream(resource) : clazz
                .getResourceAsStream(resource);
    }
}

Related

  1. getResourceAsStream(Class claz, String name)
  2. getResourceAsStream(Class clazz, String name)
  3. getResourceAsStream(Class clazz, String resource)
  4. getResourceAsStream(Class clazz, String resource, boolean checkThreadContextFirst)
  5. getResourceAsStream(Class clazz, String fileName)
  6. getResourceAsStream(Class clazz, String resourceName)
  7. getResourceAsStream(Class testClass, String resource)
  8. getResourceAsStream(final String fileName, ClassLoader classLoader)
  9. getResourceAsStream(final String name)