public class FileBatch extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
ORIGINAL_PATHS_FILENAME
Name of the file in the zip file that contains the original paths/filenames
|
| Constructor and Description |
|---|
FileBatch() |
| Modifier and Type | Method and Description |
|---|---|
static FileBatch |
forFiles(File... files)
Create a FileBatch from the specified files
|
static FileBatch |
forFiles(List<File> files)
Create a FileBatch from the specified files
|
static FileBatch |
readFromZip(File file)
Read a FileBatch from the specified file.
|
static FileBatch |
readFromZip(InputStream is)
Read a FileBatch from the specified input stream.
|
void |
writeAsZip(File f)
Write the FileBatch to the specified File, in zip file format
|
void |
writeAsZip(OutputStream os) |
public static final String ORIGINAL_PATHS_FILENAME
public static FileBatch readFromZip(File file) throws IOException
writeAsZip(File) or writeAsZip(OutputStream)file - File to read fromIOException - If an error occurs during readingpublic static FileBatch readFromZip(InputStream is) throws IOException
writeAsZip(File) or writeAsZip(OutputStream)is - Input stream to read fromIOException - If an error occurs during readingpublic static FileBatch forFiles(File... files) throws IOException
files - Files to create the FileBatch fromIOException - If an error occurs during reading of the file contentpublic static FileBatch forFiles(List<File> files) throws IOException
files - Files to create the FileBatch fromIOException - If an error occurs during reading of the file contentpublic void writeAsZip(File f) throws IOException
f - File to write toIOException - If an error occurs during writingpublic void writeAsZip(OutputStream os) throws IOException
os - Write the FileBatch to the specified output stream, in zip file formatIOException - If an error occurs during writingCopyright © 2022. All rights reserved.