All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softicar.platform.common.core.java.jar.JarFileEntry Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
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();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy