Java BufferedReader Create getBufferedReaderAsResource(Class clazz, String fileName)

Here you can find the source of getBufferedReaderAsResource(Class clazz, String fileName)

Description

get Buffered Reader As Resource

License

Open Source License

Declaration

public static BufferedReader getBufferedReaderAsResource(Class<?> clazz, String fileName) 

Method Source Code

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

import java.io.BufferedReader;

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

public class Main {
    public static BufferedReader getBufferedReaderAsResource(Class<?> clazz, String fileName) {
        return new BufferedReader(getInputStreamReaderAsResource(clazz, fileName));
    }/*from   www . j  a v  a  2  s .  c  o  m*/

    public static InputStreamReader getInputStreamReaderAsResource(Class<?> clazz, String fileName) {
        return new InputStreamReader(getInputStreamAsResource(clazz, fileName));
    }

    public static InputStream getInputStreamAsResource(Class<?> clazz, String fileName) {
        InputStream stream = clazz.getResourceAsStream(fileName);
        return stream;
    }
}

Related

  1. getBufferedReader(String file)
  2. getBufferedReader(String filename)
  3. getBufferedReader(String filename, String encoding)
  4. getBufferedReader(String nombreFichero)
  5. getBufferedReader(String szFile)
  6. getBufferedReaderFromFileName(File file)
  7. getBufferedReaderFromInputStream(InputStream src)
  8. getBufferedReaderFromInputStreamReader(InputStreamReader isReader)
  9. getBufferedReaderMaybeGZ(String f)