*/
protected ResourceFlags getFlags(Resource r) throws ZipException {
if (r instanceof ArchiveResource) {
if (r instanceof CommonsCompressArchiveResource) {
if (r instanceof TarResource) {
TarResource tr = (TarResource) r;
return new ResourceFlags(tr.getMode(), tr.getUid(),
tr.getGid(), tr.getUserName(),
tr.getGroup());
} else if (r instanceof ZipResource) {
ZipResource zr = (ZipResource) r;
return new ResourceFlags(zr.getMode(), zr.getExtraFields(),
zr.getMethod());
} else {
CommonsCompressArchiveResource cr =
(CommonsCompressArchiveResource) r;
return new ResourceFlags(cr.getMode(), cr.getUid(),
cr.getGid());
}
} else if (r instanceof
org.apache.tools.ant.types.resources.TarResource) {
org.apache.tools.ant.types.resources.TarResource tr =
(org.apache.tools.ant.types.resources.TarResource) r;
return new ResourceFlags(tr.getMode(), tr.getUid(),
tr.getGid(), tr.getUserName(),
tr.getGroup());
} else if (r instanceof
org.apache.tools.ant.types.resources.ZipResource) {
org.apache.tools.ant.types.resources.ZipResource zr =
(org.apache.tools.ant.types.resources.ZipResource) r;