public class ZipUtility extends Object
Constructor | Description |
---|---|
ZipUtility() |
Modifier and Type | Method | Description |
---|---|---|
static String |
toFileNameFromZip(String aZipFileName) |
Truncates the ".zip" suffix from the filename and returns the result.
|
static InputStream |
toInputStream(File aFile) |
Returns an
InputStream from the provided File . |
public static InputStream toInputStream(File aFile) throws ZipException, IOException, FileNotFoundException
InputStream
from the provided File
. In case
the file points to a ZIP compressed file, then the uncompressed data is
provided by the InputStream
.aFile
- The File
for which to get the InputStream
.InputStream
, in case of a ZIP compressed File
,
an uncompressed InputStream
is returned.ZipException
- in case there were problems when accessing the ZIP
compressed File
.IOException
- in case there were problems working with the
File
.FileNotFoundException
- in case there was none such File
found.public static String toFileNameFromZip(String aZipFileName)
aZipFileName
- The file name of the ZIP file for which to get the
"inner" file name.Copyright © 2021. All rights reserved.