title: Reading text files in a zip archive
body: <p>I have zip archive that contains a bunch of plain text files in it.  I want to parse each text files data.  Here's what I've written so far:</p>
  
  <pre><code>try {
      final ZipFile zipFile = new ZipFile(chooser.getSelectedFile());
      final Enumeration&lt;? extends ZipEntry&gt; entries = zipFile.entries();
      ZipInputStream zipInput = null;
  
      while (entries.hasMoreElements()) {
          final ZipEntry zipEntry = entries.nextElement();
          if (!zipEntry.isDirectory()) {
              final String fileName = zipEntry.getName();
              if (fileName.endsWith(".txt")) {
                  zipInput = new ZipInputStream(new FileInputStream(fileName));
                  final RandomAccessFile rf = new RandomAccessFile(fileName, "r");
                  String line;
                  while((line = rf.readLine()) != null) {
                      System.out.println(line);
                  }
                  rf.close();
                  zipInput.closeEntry();
              }
          }
      }
      zipFile.close();
  }
  catch (final IOException ioe) {
      System.err.println("Unhandled exception:");
      ioe.printStackTrace();
      return;
  }
  </code></pre>
  
  <p>Do I need a RandomAccessFile to do this?  I'm lost at the point where I have the ZipInputStream. </p>