if (prefix.length() > 0 && fullpath.length() > 0) {
throw new BuildException("Both prefix and fullpath attributes must"
+ " not be set on the same fileset.");
}
ZipScanner zipScanner = (ZipScanner) ds;
File zipSrc = fs.getSrc();
ZipEntry entry;
java.util.zip.ZipEntry origEntry;
ZipInputStream in = null;
try {
in = new ZipInputStream(new FileInputStream(zipSrc));
while ((origEntry = in.getNextEntry()) != null) {
entry = new ZipEntry(origEntry);
String vPath = entry.getName();
if (zipScanner.match(vPath)) {
if (fullpath.length() > 0) {
addParentDirs(null, fullpath, zOut, "");
zipFile(in, zOut, fullpath, entry.getTime(), zipSrc);
} else {
addParentDirs(null, vPath, zOut, prefix);