public class ZipFileReader extends Object implements Closeable
| Constructor and Description |
|---|
ZipFileReader(String archivePath)
Creates an instance for zip file reading.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Set<String> |
getFileNames()
Get all file entries paths inside the reading zip file.
|
InputStream |
readFromZip(String fileName)
Read single file from zip.
|
public ZipFileReader(String archivePath) throws IOException
archivePath - the path to the zip file to readIOException - if some I/O exception occurspublic Set<String> getFileNames()
Set of all file entries pathspublic InputStream readFromZip(String fileName) throws IOException
fileName - the file path inside zip to readInputStream represents read file contentIOException - if some I/O exception occurspublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 1998–2022 iText Group NV. All rights reserved.