|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecteu.cedarsoft.utils.ZipCreator
public class ZipCreator
Helper class that creates zip files
| Constructor Summary | |
|---|---|
ZipCreator(java.io.File zipFile)
Create a new zip creator with the given file as backend |
|
| Method Summary | |
|---|---|
protected void |
addFiles(java.lang.String baseName,
java.util.zip.ZipOutputStream outStream,
java.io.File directory)
Add the files within the given directory to the ZipOutputStream. |
protected static java.lang.String |
getRelativePath(java.lang.String baseName,
java.io.File file)
Returns the relative path |
java.io.File |
getZipFile()
Returns the zip file |
java.io.File |
zip(java.io.File... directories)
Zip all files within the given directories |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZipCreator(@NotNull
java.io.File zipFile)
zipFile - the zip file| Method Detail |
|---|
@NotNull public java.io.File getZipFile()
public java.io.File zip(@NotNull
java.io.File... directories)
throws java.io.IOException
directories - the directories all files are zipped within
java.io.IOException - if an io exception occures
protected void addFiles(@NotNull
java.lang.String baseName,
@NotNull
java.util.zip.ZipOutputStream outStream,
@NotNull
java.io.File directory)
throws java.io.IOException
baseName - represents the relative base name within the zip fileoutStream - the ouput streamdirectory - the directory
java.io.IOException
@NotNull
protected static java.lang.String getRelativePath(@NotNull
java.lang.String baseName,
@NotNull
java.io.File file)
throws java.io.IOException
baseName - the base pathfile - the file
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||