+ if (entryLName.equals("version")) {
+ // Nothing to do for now ("first"
+ // version is 3.0)
+ } else if (entryLName.endsWith(".info")) {
+ // Info file
+ IOUtils.write(zipIn, tmpInfo);
+ } else if (imageEntry) {
+ // Cover
+ if (getCover() && cover == null) {
+ try {
+ cover = new Image(zipIn);
+ } catch (Exception e) {
+ Instance.getInstance().getTraceHandler()
+ .error(e);
+ }
+ }
+ } else if (entryLName.equals("url")) {
+ String[] descArray = StringUtils
+ .unhtml(IOUtils.readSmallStream(zipIn)).trim()
+ .split("\n");
+ if (descArray.length > 0) {
+ url = descArray[0].trim();
+ }
+ } else if (entryLName.endsWith(".desc")) {
+ // // For old files
+ // if (this.desc != null) {
+ // this.desc = IOUtils.readSmallStream(zipIn).trim();
+ // }
+ } else if (entryLName.equals("summary")) {
+ String[] descArray = StringUtils
+ .unhtml(IOUtils.readSmallStream(zipIn)).trim()
+ .split("\n");
+ int skip = 0;
+ if (descArray.length > 1) {
+ title = descArray[0].trim();
+ skip = 1;
+ if (descArray.length > 2
+ && descArray[1].startsWith("©")) {
+ author = descArray[1].substring(1).trim();
+ skip = 2;
+ }
+ }
+ // this.desc = "";
+ // for (int i = skip; i < descArray.length; i++) {
+ // this.desc += descArray[i].trim() + "\n";
+ // }
+ //
+ // this.desc = this.desc.trim();
+ } else {
+ // Hopefully the data file
+ IOUtils.write(zipIn, tmp);
+ }
+ }
+ }