}
// overridden in order to take advantage of ZipFile
protected void expandFile(FileUtils fileUtils, File srcF, File dir) {
log("Expanding: " + srcF + " into " + dir, Project.MSG_INFO);
ZipFile zf = null;
FileNameMapper mapper = getMapper();
if (!srcF.exists()) {
throw new BuildException("Unable to expand " + srcF
+ " as the file does not exist",
getLocation());
}
try {
zf = new ZipFile(srcF, getEncoding(), true);
boolean empty = true;
Enumeration e = zf.getEntries();
while (e.hasMoreElements()) {
empty = false;
ZipArchiveEntry ze = (ZipArchiveEntry) e.nextElement();
log("extracting " + ze.getName(), Project.MSG_DEBUG);
InputStream is = null;
try {
extractFile(fileUtils, srcF, dir,
is = zf.getInputStream(ze),
ze.getName(), new Date(ze.getTime()),
ze.isDirectory(), mapper);
} finally {
FileUtils.close(is);
}