1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.rice.kew.batch;
18
19 import java.io.IOException;
20 import java.io.InputStream;
21 import java.util.zip.ZipEntry;
22 import java.util.zip.ZipFile;
23
24
25
26
27
28
29
30
31 class ZipXmlDoc extends BaseXmlDoc {
32 private ZipFile zipFile;
33 private ZipEntry zipEntry;
34 public ZipXmlDoc(ZipFile zipFile, ZipEntry zipEntry, XmlDocCollection collection) {
35 super(collection);
36 this.zipFile = zipFile;
37 this.zipEntry = zipEntry;
38 }
39 public String getName() {
40 return zipEntry.getName();
41 }
42 public InputStream getStream() throws IOException {
43 return zipFile.getInputStream(zipEntry);
44 }
45 public int hashCode() {
46 return zipEntry.hashCode();
47 }
48 public boolean equals(Object o) {
49 if (!(o instanceof ZipXmlDoc)) return false;
50 return zipEntry.equals(((ZipXmlDoc) o).zipEntry);
51 }
52 }