Java Resource Load getResourceAsReader(String name)

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

Description

get Resource As Reader

License

Open Source License

Declaration

public static InputStreamReader getResourceAsReader(String name) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.InputStream;
import java.io.InputStreamReader;

public class Main {
    public static InputStreamReader getResourceAsReader(String name) {
        return new InputStreamReader(getResourceAsStream(name));
    }/*w w w . j  av  a  2 s .c  om*/

    public static InputStream getResourceAsStream(String name) {
        return Thread.currentThread().getContextClassLoader().getResourceAsStream(name);
    }
}

Related

  1. getResourceAsFile(String resourcePath)
  2. getResourceAsFile(T testSuite, String resourceName)
  3. getResourceAsInputStream(Class resourceClass, String resourceName)
  4. getResourceAsProperties(String resource)
  5. getResourceAsReader(final Class classLocation, final String resourceName)
  6. getResourceAsReader(String relativeName, Class clazz, String enc)
  7. getResourceAsStream(Class baseclass, String name)
  8. getResourceAsStream(Class claz, String name)
  9. getResourceAsStream(Class clazz, String name)