1 package com.github.davidmoten.rx2.util;
2
3 import java.io.InputStream;
4 import java.util.zip.ZipEntry;
5
6 public final class ZippedEntry {
7
8 final String name;
9 final long time;
10
11
12
13 final long crc;
14 final long size;
15 final long csize;
16 final int method;
17 final byte[] extra;
18 final String comment;
19 private final InputStream is;
20
21 public ZippedEntry(ZipEntry e, InputStream is) {
22 this.name = e.getName();
23 this.time = e.getTime();
24
25
26
27 this.crc = e.getCrc();
28 this.size = e.getSize();
29 this.csize = e.getCompressedSize();
30 this.method = e.getMethod();
31 this.extra = e.getExtra();
32 this.comment = e.getComment();
33 this.is = is;
34 }
35
36 public InputStream getInputStream() {
37 return is;
38 }
39
40 public String getName() {
41 return name;
42 }
43
44 public long getTime() {
45 return time;
46 }
47
48
49
50
51
52
53
54
55
56
57
58
59
60 public long getCrc() {
61 return crc;
62 }
63
64 public long getSize() {
65 return size;
66 }
67
68 public long getCompressedSize() {
69 return csize;
70 }
71
72 public int getMethod() {
73 return method;
74 }
75
76 public byte[] getExtra() {
77 return extra;
78 }
79
80 public String getComment() {
81 return comment;
82 }
83
84 }