|
Jacson | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Zip de.spieleck.helper.PrefixZipTask
Create a Zipfile allow relocation of zipfile contents. That is, we have an extra attribute <globalprefix> which is textually prepended to all names in zipfile. For example you can use
<taskdef classname="de.spieleck.helper.PrefixZipTask" name="xzip" classpath="${name}.jar" /> <xzip zipfile="${release.zip}" globalprefix="${zip.prefix}/"> <fileset refid="releaseFileset"/> <fileset refid="sampleFileset"/> </xzip>with filesets instead of zipfilesets.
Field Summary | |
protected java.lang.String |
globalPrefix
Allow a global prefix for names within the Zipfile |
Constructor Summary | |
PrefixZipTask()
|
Method Summary | |
void |
reset()
|
void |
setGlobalPrefix(java.lang.String globalPrefix)
Allow a global prefix for names within the Zipfile |
protected void |
zipDir(java.io.File dir,
ZipOutputStream zOut,
java.lang.String vPath,
int mode)
Patch zipDir(), insert globalPrefix if appropriate. |
protected void |
zipFile(java.io.InputStream in,
ZipOutputStream zOut,
java.lang.String vPath,
long lastModified,
java.io.File fromArchive,
int mode)
Patch zipFile(), insert globalPrefix if appropriate. |
protected java.lang.String |
zipPath(java.lang.String vPath)
Patch the path for inclusion in zipfile. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String globalPrefix
Constructor Detail |
public PrefixZipTask()
Method Detail |
public void setGlobalPrefix(java.lang.String globalPrefix)
globalPrefix
- the String to prefix all names.protected java.lang.String zipPath(java.lang.String vPath)
vPath
- the unpatched path
protected void zipDir(java.io.File dir, ZipOutputStream zOut, java.lang.String vPath, int mode) throws java.io.IOException
globalPrefix
if appropriate.
java.io.IOException
protected void zipFile(java.io.InputStream in, ZipOutputStream zOut, java.lang.String vPath, long lastModified, java.io.File fromArchive, int mode) throws java.io.IOException
globalPrefix
if appropriate.
java.io.IOException
public void reset()
|
Spieleck | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |