Code example for JarEntry

Methods: getName

0
     * @return The resulting file 
     * @throws IOException If exception occurs during extraction process 
     */ 
    private Path extractFile(JarFile jarFile, JarEntry jarEntry,
            Path destinationDir) throws IOException {
        Path destinationFile = destinationDir.resolve(jarEntry.getName());
 
        if (Files.isDirectory(destinationFile)) {
            return null; 
        } 
 
        Files.createDirectories(destinationFile.getParent());
 
        Files.copy(jarFile.getInputStream(jarEntry), destinationFile);
 
        return destinationFile;
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java