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 ZipEntrySource
null
).public ZipEntry getEntry()
getEntry
in interface ZipEntrySource
null
).public InputStream getInputStream() throws IOException
getInputStream
in interface ZipEntrySource
null
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.