Skip to content

Package io.github.qishr.cascara.common.util

Class ArchiveFile

java.lang.Object
        io.github.qishr.cascara.common.util.ArchiveFile

Direct Known Subtypes:
    JarFile, VsixPackage


public class ArchiveFile

Nested Class Summary

Modifier and Type Class Description
public static io.github.qishr.cascara.common.util.ArchiveFile.FileInfo

Field Summary

Modifier and Type Field Description
protected Path archivePath

Constructor Summary

Constructor Description
ArchiveFile(Path archivePath)

Method Summary

Modifier and Type Method Description
public static ArchiveFile load(Path archivePath)
public InputStream getInputStream(String filePath)
public byte[] extractFile(String filePath)
protected static byte[] extractFile(Path archivePath, String filePath)
public List<FileInfo> listFiles()
public List<FileInfo> listFiles(String dirPath)
protected static List<FileInfo> listFiles(Path archivePath, String dirPath)

Field Details

archivePath

protected Path archivePath


Method Details

load

public static ArchiveFile load(Path archivePath)

Throws:

IOException


getInputStream

public InputStream getInputStream(String filePath)


extractFile

public byte[] extractFile(String filePath)


extractFile

protected static byte[] extractFile(Path archivePath, String filePath)


listFiles

public List<FileInfo> listFiles()

Throws:

IOException


listFiles

public List<FileInfo> listFiles(String dirPath)

Throws:

IOException


listFiles

protected static List<FileInfo> listFiles(Path archivePath, String dirPath)

Throws:

IOException