Class Cab
- java.lang.Object
- 
- org.apache.tools.ant.ProjectComponent
- 
- org.apache.tools.ant.Task
- 
- org.apache.tools.ant.taskdefs.MatchingTask
- 
- org.apache.tools.ant.taskdefs.optional.Cab
 
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable,- SelectorContainer
 
 public class Cab extends MatchingTask Create a CAB archive.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.StringarchiveType- 
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTaskfileset
 - 
Fields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
 
- 
 - 
Constructor SummaryConstructors Constructor Description Cab()
 - 
Method SummaryModifier and Type Method Description voidaddFileset(FileSet fileset)Adds a set of files to archive.protected voidappendFiles(java.util.Vector<java.lang.String> files, DirectoryScanner ds)Append all files found by a directory scanner to a vector.protected voidcheckConfiguration()Check if the attributes and nested elements are correct.protected ExecTaskcreateExec()Create a new exec delegate.protected java.io.FilecreateListFile(java.util.Vector<java.lang.String> files)Creates a list file.voidexecute()execute this task.protected java.util.Vector<java.lang.String>getFileList()Get the complete list of files to be included in the cab.protected booleanisUpToDate(java.util.Vector<java.lang.String> files)Check to see if the target is up to date with respect to input files.voidsetBasedir(java.io.File baseDir)Base directory to look in for files to CAB.voidsetCabfile(java.io.File cabFile)The name/location of where to create the .cab file.voidsetCompress(boolean compress)If true, compress the files otherwise only store them.voidsetOptions(java.lang.String options)Sets additional cabarc options that are not supported directly.voidsetVerbose(boolean verbose)If true, display cabarc output.- 
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTaskadd, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
 - 
Methods inherited from class org.apache.tools.ant.TaskbindToOwner, 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.ProjectComponentclone, getDescription, getLocation, getProject, setDescription, setLocation
 
- 
 
- 
- 
- 
Method Detail- 
setCabfilepublic void setCabfile(java.io.File cabFile) The name/location of where to create the .cab file.- Parameters:
- cabFile- the location of the cab file.
 
 - 
setBasedirpublic void setBasedir(java.io.File baseDir) Base directory to look in for files to CAB.- Parameters:
- baseDir- base directory for files to cab.
 
 - 
setCompresspublic void setCompress(boolean compress) If true, compress the files otherwise only store them.- Parameters:
- compress- a- booleanvalue.
 
 - 
setVerbosepublic void setVerbose(boolean verbose) If true, display cabarc output.- Parameters:
- verbose- a- booleanvalue.
 
 - 
setOptionspublic void setOptions(java.lang.String options) Sets additional cabarc options that are not supported directly.- Parameters:
- options- cabarc command line options.
 
 - 
addFilesetpublic void addFileset(FileSet fileset) Adds a set of files to archive.- Parameters:
- fileset- a set of files to archive.
 
 - 
checkConfigurationprotected void checkConfiguration() throws BuildExceptionCheck if the attributes and nested elements are correct.- Throws:
- BuildException- on error.
 
 - 
createExecprotected ExecTask createExec() throws BuildException Create a new exec delegate. The delegate task is populated so that it appears in the logs to be the same task as this one.- Returns:
- the delegate.
- Throws:
- BuildException- on error.
 
 - 
isUpToDateprotected boolean isUpToDate(java.util.Vector<java.lang.String> files) Check to see if the target is up to date with respect to input files.- Parameters:
- files- the list of files to check.
- Returns:
- true if the cab file is newer than its dependents.
 
 - 
createListFileprotected java.io.File createListFile(java.util.Vector<java.lang.String> files) throws java.io.IOExceptionCreates a list file. This temporary file contains a list of all files to be included in the cab, one file per line.This method expects to only be called on Windows and thus quotes the file names. - Parameters:
- files- the list of files to use.
- Returns:
- the list file created.
- Throws:
- java.io.IOException- if there is an error.
 
 - 
appendFilesprotected void appendFiles(java.util.Vector<java.lang.String> files, DirectoryScanner ds)Append all files found by a directory scanner to a vector.- Parameters:
- files- the vector to append the files to.
- ds- the scanner to get the files from.
 
 - 
getFileListprotected java.util.Vector<java.lang.String> getFileList() throws BuildExceptionGet the complete list of files to be included in the cab. Filenames are gathered from the fileset if it has been added, otherwise from the traditional include parameters.- Returns:
- the list of files.
- Throws:
- BuildException- if there is an error.
 
 - 
executepublic void execute() throws BuildExceptionexecute this task.- Overrides:
- executein class- Task
- Throws:
- BuildException- on error.
 
 
- 
 
-