summaryrefslogtreecommitdiff
path: root/java/util/zip/GZIPInputStream.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2004-02-04 07:53:44 +0000
committerMichael Koch <konqueror@gmx.de>2004-02-04 07:53:44 +0000
commit5995e80885120bfd87751d3d7ed99bc8a0eac64f (patch)
tree13c55e78cc89c8fd5bb7a85c0d5b8b13ce4eae18 /java/util/zip/GZIPInputStream.java
parentae8c30ebd4d7b20832df50745efebf628509add4 (diff)
downloadclasspath-5995e80885120bfd87751d3d7ed99bc8a0eac64f.tar.gz
2004-02-04 Michael Koch <konqueror@gmx.de>
* java/util/zip/Deflater.java, java/util/zip/DeflaterOutputStream.java, java/util/zip/GZIPInputStream.java, java/util/zip/GZIPOutputStream.java: Merged class head with libgcj.
Diffstat (limited to 'java/util/zip/GZIPInputStream.java')
-rw-r--r--java/util/zip/GZIPInputStream.java26
1 files changed, 6 insertions, 20 deletions
diff --git a/java/util/zip/GZIPInputStream.java b/java/util/zip/GZIPInputStream.java
index 7afbff71c..ad47236b6 100644
--- a/java/util/zip/GZIPInputStream.java
+++ b/java/util/zip/GZIPInputStream.java
@@ -1,5 +1,5 @@
-/* java.util.zip.GZIPInputStream
- Copyright (C) 2001 Free Software Foundation, Inc.
+/* GZIPInputStream.java - Input filter for reading gzip file
+ Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,12 +41,12 @@ import java.io.InputStream;
import java.io.IOException;
import java.io.EOFException;
-
/**
* This filter stream is used to decompress a "GZIP" format stream.
* The "GZIP" format is described in RFC 1952.
*
* @author John Leuner
+ * @author Tom Tromey
* @since JDK 1.1
*/
public class GZIPInputStream
@@ -57,37 +57,31 @@ public class GZIPInputStream
*/
public static final int GZIP_MAGIC = 0x1f8b;
-
/**
* The mask for bit 0 of the flag byte.
*/
static final int FTEXT = 0x1;
-
/**
* The mask for bit 1 of the flag byte.
*/
static final int FHCRC = 0x2;
-
/**
* The mask for bit 2 of the flag byte.
*/
static final int FEXTRA = 0x4;
-
/**
* The mask for bit 3 of the flag byte.
*/
static final int FNAME = 0x8;
-
/**
* The mask for bit 4 of the flag byte.
*/
static final int FCOMMENT = 0x10;
-
/**
* The CRC-32 checksum value for uncompressed data.
*/
@@ -99,13 +93,11 @@ public class GZIPInputStream
*/
protected boolean eos;
-
/**
* Indicates whether or not the GZIP header has been read in.
*/
private boolean readGZIPHeader;
-
/**
* Creates a GZIPInputStream with the default buffer size.
*
@@ -120,19 +112,16 @@ public class GZIPInputStream
this(in, 4096);
}
-
/**
* Creates a GZIPInputStream with the specified buffer size.
*
* @param in The stream to read compressed data from
* (in GZIP format).
- *
* @param size The size of the buffer to use.
*
* @throws IOException if an error occurs during an I/O operation.
- *
- * @throws java.lang.IllegalArgumentException if <code>size</code>
- * is less than or equal to 0.
+ * @throws IllegalArgumentException if <code>size</code>
+ * is less than or equal to 0.
*/
public GZIPInputStream(InputStream in, int size)
throws IOException
@@ -141,7 +130,6 @@ public class GZIPInputStream
crc = new CRC32();
}
-
/**
* Closes the input stream.
*
@@ -150,10 +138,10 @@ public class GZIPInputStream
public void close()
throws IOException
{
+ // Nothing to do here.
super.close();
}
-
/**
* Reads in GZIP-compressed data and stores it in uncompressed form
* into an array of bytes. The method will block until either
@@ -162,10 +150,8 @@ public class GZIPInputStream
*
* @param buf the buffer into which the uncompressed data will
* be stored.
- *
* @param offset the offset indicating where in <code>buf</code>
* the uncompressed data should be placed.
- *
* @param len the number of uncompressed bytes to be read.
*/
public int read(byte[] buf, int offset, int len) throws IOException