java.util.zip
Class InflaterInputStream
- Closeable
This filter stream is used to decompress data compressed in the "deflate"
format. The "deflate" format is described in RFC 1951.
This stream may form the basis for other decompression filters, such
as the GZIPInputStream
.
protected byte[] | buf - Byte array used as a buffer
|
protected Inflater | inf - Decompressor for this filter
|
protected int | len - Size of buffer
|
int | available() - Returns 0 once the end of the stream (EOF) has been reached.
|
void | close() - Closes the input stream
|
protected void | fill() - Fills the buffer with more data to decompress.
|
void | mark(int readLimit)
|
boolean | markSupported()
|
int | read() - Reads one byte of decompressed data.
|
int | read(byte[] b, int off, int len) - Decompresses data into the byte array
|
void | reset()
|
long | skip(long n) - Skip specified number of bytes of uncompressed data
|
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
buf
protected byte[] buf
Byte array used as a buffer
len
protected int len
Size of buffer
InflaterInputStream
public InflaterInputStream(InputStream in)
Create an InflaterInputStream with the default decompresseor
and a default buffer size.
in
- the InputStream to read bytes from
InflaterInputStream
public InflaterInputStream(InputStream in,
Inflater inf)
Create an InflaterInputStream with the specified decompresseor
and a default buffer size.
in
- the InputStream to read bytes frominf
- the decompressor used to decompress data read from in
InflaterInputStream
public InflaterInputStream(InputStream in,
Inflater inf,
int size)
Create an InflaterInputStream with the specified decompresseor
and a specified buffer size.
in
- the InputStream to read bytes frominf
- the decompressor used to decompress data read from insize
- size of the buffer to use
fill
protected void fill()
throws IOException
Fills the buffer with more data to decompress.
read
public int read(byte[] b,
int off,
int len)
throws IOException
Decompresses data into the byte array
- read in interface FilterInputStream
b
- the array to read and decompress data intooff
- the offset indicating where the data should be placedlen
- the number of bytes to decompress
InflaterInputStream.java - Input stream filter for decompressing
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.