}
private void executeUnzip() throws Exception {
File file = null;
JarFile jar;
Enumeration content;
JarEntry entry;
String classFile = "";
String filename = "";
long archiveDate;
long hdDate;
int extracted = 0;
int processed = 0;
// individuelle Manifest Sektionen
ArrayList iSecName = new ArrayList();
ArrayList iSecOrigin = new ArrayList();
ArrayList iSecDate = new ArrayList();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
String jarDate;
int index;
// Verzeichnis der Archive einlesen
file = new File( this.source );
// alle zu durchsuchenden jar- und zip-Archive ermitteln
String path = null;
String[] list = null;
if ( file.isDirectory() ) {
path = this.source;
list = this.archiveFilter(file.list());
} else {
path = file.getPath().substring(0,file.getPath().length()-file.getName().length());
list = new String[1];
list[0] = file.getName();
}
if ( list.length == 0 ) {
this.logln("\n no jar/zip archives found");
return;
}
if ( this.oldOverwrites )
this.logln("\n directive: overwrite newer versions");
else
this.logln("\n directive: overwrite older versions");
try {
// alle Archive durchgehen
for (int i=0; i<list.length; i++) {
this.logln("\n unpack "+ list[i] +":");
jar = new JarFile(path + list[i]);
content = jar.entries();
file = new File(path + list[i]);
jarDate = ( file.lastModified() < 0 ) ? "unknown" : sdf.format(new Date(file.lastModified()));
// alle Klassen eines Archivs durchgehen