com.softicar.platform.common.core.java.jar.JarFileEntry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-common Show documentation
Show all versions of platform-common Show documentation
The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.
package com.softicar.platform.common.core.java.jar;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
public class JarFileEntry {
private final ZipFile zipFile;
private final ZipEntry entry;
public JarFileEntry(ZipFile zipFile, ZipEntry entry) {
this.zipFile = zipFile;
this.entry = entry;
}
public String getPath() {
return entry.getName();
}
public InputStream getInputStream() {
try {
return zipFile.getInputStream(entry);
} catch (IOException exception) {
throw new RuntimeException(exception);
}
}
public boolean isFolder() {
return entry.isDirectory();
}
}