org.apache.ant.compress.taskdefs
Class Zip

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.ant.compress.taskdefs.ArchiveBase
              extended by org.apache.ant.compress.taskdefs.Zip
All Implemented Interfaces:
java.lang.Cloneable

public class Zip
extends ArchiveBase

Creates zip archives.


Nested Class Summary
static class Zip.UnicodeExtraField
          Policiy for creation of Unicode extra fields: never, always or not-encodeable.
static class Zip.Zip64Enum
          Policiy for creation of Zip64 extended information: never, always or as-needed.
 
Nested classes/interfaces inherited from class org.apache.ant.compress.taskdefs.ArchiveBase
ArchiveBase.Duplicate, ArchiveBase.EntryBuilder, ArchiveBase.FileSetBuilder, ArchiveBase.Mode, ArchiveBase.ResourceCollectionFlags, ArchiveBase.ResourceFlags, ArchiveBase.ResourceWithFlags, ArchiveBase.WhenEmpty
 
Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
Zip()
           
 
Method Summary
 void setComment(java.lang.String comment)
          Comment to use for archive.
 void setCreateUnicodeExtraFields(Zip.UnicodeExtraField b)
          Whether Unicode extra fields will be created.
 void setFallBackToUTF8(boolean b)
          Whether to fall back to UTF-8 if a name cannot be encoded using the specified encoding.
 void setKeepCompression(boolean keep)
          Whether the original compression of entries coming from a ZIP archive should be kept (for example when updating an archive).
 void setLevel(int level)
          Set the compression level to use.
 void setUseLanguageEncodingFlag(boolean b)
          Whether to set the language encoding flag.
 void setZip64Mode(Zip.Zip64Enum mode)
          Whether to create Zip64 extended information.
 
Methods inherited from class org.apache.ant.compress.taskdefs.ArchiveBase
add, addConfiguredDest, addDuplicate, bendSlashesForward, ensureParentDirs, execute, findSources, findUnmatchedTargets, getDest, getEncoding, getEntryBuilder, getFactory, getFileSetBuilder, getFlags, getFlags, getMode, getPreserveLeadingSlashes, isFilesOnly, isUpToDate, round, setDest, setDestfile, setDuplicate, setEncoding, setEntryBuilder, setFactory, setFileSetBuilder, setFilesOnly, setMode, setPreserve0permissions, setPreserveLeadingSlashes, setRoundUp, setWhenempty, sort, validate, writeArchive
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Zip

public Zip()
Method Detail

setLevel

public void setLevel(int level)
Set the compression level to use. Default is Deflater.DEFAULT_COMPRESSION.

Parameters:
level - compression level.

setComment

public void setComment(java.lang.String comment)
Comment to use for archive.

Parameters:
comment - The content of the comment.

setKeepCompression

public void setKeepCompression(boolean keep)
Whether the original compression of entries coming from a ZIP archive should be kept (for example when updating an archive). Default is false.

Parameters:
keep - if true, keep the original compression

setFallBackToUTF8

public void setFallBackToUTF8(boolean b)
Whether to fall back to UTF-8 if a name cannot be encoded using the specified encoding.

Defaults to false.


setUseLanguageEncodingFlag

public void setUseLanguageEncodingFlag(boolean b)
Whether to set the language encoding flag.


setCreateUnicodeExtraFields

public void setCreateUnicodeExtraFields(Zip.UnicodeExtraField b)
Whether Unicode extra fields will be created.


setZip64Mode

public void setZip64Mode(Zip.Zip64Enum mode)
Whether to create Zip64 extended information.

Since:
Apache Compress Antlib 1.1