public class FileSource extends Object implements ZipEntrySource
| Constructor and Description |
|---|
FileSource(String path,
File file) |
| Modifier and Type | Method and Description |
|---|---|
ZipEntry |
getEntry() |
InputStream |
getInputStream() |
String |
getPath() |
static FileSource[] |
pair(File[] files,
String[] names)
Creates a sequence of FileSource objects via mapping
a sequence of files to the sequence of corresponding names
for the entries
|
String |
toString() |
public String getPath()
getPath in interface ZipEntrySourcenull).public ZipEntry getEntry()
getEntry in interface ZipEntrySourcenull).public InputStream getInputStream() throws IOException
getInputStream in interface ZipEntrySourcenull if this entry is a directory.IOException - can throw getting the InputStreampublic static FileSource[] pair(File[] files, String[] names)
files - file array to form the data of the objects
in the resulting arraynames - file array to form the names of the objects
in the resulting arrayIllegalArgumentException - if the names array
contains less items than the files arrayCopyright © 2017 ZeroTurnaround. All rights reserved.