Java Resource Load getResourceAsStreamInClassPath(@SuppressWarnings("rawtypes") Class clazz, String filepath)

Here you can find the source of getResourceAsStreamInClassPath(@SuppressWarnings("rawtypes") Class clazz, String filepath)

Description

get Resource As Stream In Class Path

License

Open Source License

Declaration

public static InputStream getResourceAsStreamInClassPath(@SuppressWarnings("rawtypes") Class clazz,
            String filepath) 

Method Source Code

//package com.java2s;

import java.io.InputStream;

public class Main {
    public static InputStream getResourceAsStreamInClassPath(@SuppressWarnings("rawtypes") Class clazz,
            String filepath) {//ww w .  j  a v a  2  s . c o  m
        return clazz.getClassLoader().getResourceAsStream(filepath);
    }
}

Related

  1. getResourceAsStream(String res)
  2. getResourceAsStream(String resName, Object obj)
  3. getResourceAsStream(String resource, ClassLoader classLoader)
  4. getResourceAsStream(String resource, ClassLoader classLoader)
  5. getResourceAsStream(String resourcePath)
  6. getResourceAsStrem(String name)
  7. getResourceAsString(Class clazz, String name)
  8. getResourceAsString(Class clazz, String resource)
  9. getResourceAsString(Class theClass, String fileName)