title: Read directly a file within a Zip file - Java
body: <p>My situation is that I have a zip file that contains some files (txt, png, ...) and I want to read it directly by their names, I have tested the following code but no result (NullPointerExcepion):</p>
  
  <pre><code>InputStream in = Main.class.getResourceAsStream("/resouces/zipfile/test.txt");
  BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
  </code></pre>
  
  <p><em>resources</em> is a package and <em>zipfile</em> is a zip file.</p>