Methods Summary |
---|
private void | checkZipFileSetAttributesAllowed()A check attributes for zipFileSet.
If there is a reference, and
it is a ZipFileSet, the zip fileset attributes
cannot be used.
if (getProject() == null
|| (isReference()
&& (getRefid().getReferencedObject(
getProject())
instanceof ZipFileSet))) {
checkAttributesAllowed();
}
|
public java.lang.Object | clone()Return a ZipFileSet that has the same properties
as this one.
if (isReference()) {
return ((ZipFileSet) getRef(getProject())).clone();
} else {
return super.clone();
}
|
public java.lang.String | getEncoding()Get the encoding used for this ZipFileSet.
if (isReference()) {
AbstractFileSet ref = getRef(getProject());
if (ref instanceof ZipFileSet) {
return ((ZipFileSet) ref).getEncoding();
} else {
return null;
}
}
return encoding;
|
protected AbstractFileSet | getRef(org.apache.tools.ant.Project p)A ZipFileset accepts another ZipFileSet or a FileSet as reference
FileSets are often used by the war task for the lib attribute
dieOnCircularReference(p);
Object o = getRefid().getReferencedObject(p);
if (o instanceof ZipFileSet) {
return (AbstractFileSet) o;
} else if (o instanceof FileSet) {
ZipFileSet zfs = new ZipFileSet((FileSet) o);
configureFileSet(zfs);
return zfs;
} else {
String msg = getRefid().getRefId() + " doesn\'t denote a zipfileset or a fileset";
throw new BuildException(msg);
}
|
protected ArchiveScanner | newArchiveScanner()Return a new archive scanner based on this one.
ZipScanner zs = new ZipScanner();
zs.setEncoding(encoding);
return zs;
|
public void | setEncoding(java.lang.String enc)Set the encoding used for this ZipFileSet.
checkZipFileSetAttributesAllowed();
this.encoding = enc;
|