blob: d472de50cd93d69f01e19c442dff9fe0893c714d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/* Copyright (C) 1999 Cygnus Solutions
This file is part of libgcj.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.util.zip;
/**
* @author Per Bothner
* @date January 6, 1999.
*/
/*
* Written using on-line Java Platform 1.2 API Specification, as well
* as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
* Status: Believed complete and correct.
*/
public class ZipEntry
{
// These values were determined using a simple test program.
public static final int STORED = 0;
public static final int DEFLATED = 8;
String comment;
long compressedSize = -1;
long crc = -1;
byte[] extra;
int method = -1;
String name;
long size = -1;
long time = -1;
ZipEntry next;
public ZipEntry (String name)
{
this.name = name;
}
public String getComment () { return comment; }
public long getCompressedSize () { return compressedSize; }
public long getCrc () { return crc; }
public byte[] getExtra() { return extra; }
public int getMethod () { return method; }
public String getName () { return name; }
public long getSize () { return size; }
public long getTime () { return time; }
public boolean isDirectory ()
{
if (name != null)
{
int nlen = name.length();
if (nlen > 0 && name.charAt(nlen-1) == '/')
return true;
}
return false;
}
public void setComment (String comment) { this.comment = comment; }
public void setCrc (long crc) { this.crc = crc; }
public void setExtra (byte[] extra) { this.extra = extra; }
public void setMethod(int method) { this.method = method; }
public void setSize (long size) { this.size = size; }
public void setTime (long time) { this.time = time; }
public String toString () { return name; }
}
|