0

I am trying to read a file from within a jarfile. After some research i found this:

InputStream input = getClass().getResourceAsStream("text_file.txt");

But how do I wrapp this into a reader?

I have tried with bufferedReader but it throws a NullPointerException

BufferedReader buffReader = new BufferedReader(new InputStreamReader(input));

So - my question is how to properly wrap the inpustream object and read the stream?

user2991252
  • 760
  • 2
  • 11
  • 27

0 Answers0