summaryrefslogtreecommitdiff
path: root/libjava/java/util/zip/ZipEntry.java
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-07 14:42:40 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-07 14:42:40 +0000
commit2c60951ba0efef23e2b765964b5dc0f1f49438a9 (patch)
treed96801a16fdf03a5682ef98730fe333a46eef944 /libjava/java/util/zip/ZipEntry.java
parent1135eed2207f8f82c589e42ce113a1c2f0310778 (diff)
downloadgcc-2c60951ba0efef23e2b765964b5dc0f1f49438a9.tar.gz
Initial revision
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26263 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/util/zip/ZipEntry.java')
-rw-r--r--libjava/java/util/zip/ZipEntry.java84
1 files changed, 84 insertions, 0 deletions
diff --git a/libjava/java/util/zip/ZipEntry.java b/libjava/java/util/zip/ZipEntry.java
new file mode 100644
index 00000000000..d472de50cd9
--- /dev/null
+++ b/libjava/java/util/zip/ZipEntry.java
@@ -0,0 +1,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; }
+}