title: After File compression I lost the Filename extension
body: <p>I am trying to compress my file using the ZipOutPutStream. I tried below code and got the compressed folder with the file. But when I am extracting the folder using 7Zip, the fileName extension is missing.
  Also I am unable to extract the folder by normal Extract option provided in Windows.</p>
  
  <p>Below is the code I tried Using Java -8</p>
  
  <p>public void compress(String compressed , String raw) {</p>
  
  <pre><code>    Path pCompressed = null;
      try {
          pCompressed = Files.createFile(Paths.get(compressed));
  
      try (ZipOutputStream zos = new ZipOutputStream(Files.newOutputStream(pCompressed))) {
          Path pRaw = Paths.get(raw);
          Files.walk(pRaw).filter(path -&gt; !Files.isDirectory(path)).forEach(path -&gt; {
                ZipEntry zipEntry = new ZipEntry(pRaw.relativize(path).toString());
                try {
                    zos.putNextEntry(zipEntry);
                    Files.copy(path, zos);
                    zos.closeEntry();
              } catch (IOException e) {
                 logger.error("Exception while copying file to compressed Directory: "+e);
              }
            });
      }
     catch(IOException ioe) {
         logger.error("Exception while compressing the output file: "+ioe);
     }
      }
      catch (IOException e1) {
          logger.error("Exception While Path initialization for compressing the file");
      }
  }
  </code></pre>
  
  <p>Expecting : After Extraction someFolder/MyFile.csv</p>