From 5995e80885120bfd87751d3d7ed99bc8a0eac64f Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Wed, 4 Feb 2004 07:53:44 +0000 Subject: 2004-02-04 Michael Koch * 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. --- java/util/zip/GZIPInputStream.java | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) (limited to 'java/util/zip/GZIPInputStream.java') 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 size - * is less than or equal to 0. + * @throws IllegalArgumentException if size + * 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 buf * 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 -- cgit v1.2.1