# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Fields | Inherited Fields | Ctors | Methods | Inherited Methods

# DeflaterInputStream

`public class DeflaterInputStream`
`` `` `extends FilterInputStream` ``

java.lang.Object
↳ | java.io.InputStream
| ↳ | java.io.FilterInputStream
|  | ↳ | java.util.zip.DeflaterInputStream

Implements an input stream filter for compressing data in the "deflate" compression format.

See also:

- `DeflaterOutputStream`
- `InflaterOutputStream`
- `InflaterInputStream`

## Summary

### Fields
`protected final byte[]` | `buf` Input buffer for reading compressed data.
`protected final Deflater` | `def` Compressor for this stream.

### Inherited fields
From class `java.io.FilterInputStream`
`protected InputStream` | `in` The input stream to be filtered.

### Public constructors
`DeflaterInputStream(InputStream in)` Creates a new input stream with a default compressor and buffer size.
`DeflaterInputStream(InputStream in, Deflater defl)` Creates a new input stream with the specified compressor and a default buffer size.
`DeflaterInputStream(InputStream in, Deflater defl, int bufLen)` Creates a new input stream with the specified compressor and buffer size.

### Public methods
`int` | `available()` Returns 0 after EOF has been reached, otherwise always return 1.
`void` | `close()` Closes this input stream and its underlying input stream, discarding any pending uncompressed data.
`void` | `mark(int limit)` This operation is not supported.
`boolean` | `markSupported()` Always returns `false` because this input stream does not support the `mark()` and `reset()` methods.
`int` | `read()` Reads a single byte of compressed data from the input stream.
`int` | `read(byte[] b, int off, int len)` Reads compressed data into a byte array.
`void` | `reset()` This operation is not supported.
`long` | `skip(long n)` Skips over and discards data from the input stream.

### Inherited methods
From class `java.io.FilterInputStream`
`int` | `available()` Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.
`void` | `close()` Closes this input stream and releases any system resources associated with the stream.
`void` | `mark(int readlimit)` Marks the current position in this input stream.
`boolean` | `markSupported()` Tests if this input stream supports the `mark` and `reset` methods.
`int` | `read()` Reads the next byte of data from this input stream.
`int` | `read(byte[] b, int off, int len)` Reads up to `len` bytes of data from this input stream into an array of bytes.
`int` | `read(byte[] b)` Reads up to `byte.length` bytes of data from this input stream into an array of bytes.
`void` | `reset()` Repositions this stream to the position at the time the `mark` method was last called on this input stream.
`long` | `skip(long n)` Skips over and discards `n` bytes of data from the input stream.
From class `java.io.InputStream`
`int` | `available()` Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream.
`void` | `close()` Closes this input stream and releases any system resources associated with the stream.
`void` | `mark(int readlimit)` Marks the current position in this input stream.
`boolean` | `markSupported()` Tests if this input stream supports the `mark` and `reset` methods.
`abstract int` | `read()` Reads the next byte of data from the input stream.
`int` | `read(byte[] b, int off, int len)` Reads up to `len` bytes of data from the input stream into an array of bytes.
`int` | `read(byte[] b)` Reads some number of bytes from the input stream and stores them into the buffer array `b`.
`void` | `reset()` Repositions this stream to the position at the time the `mark` method was last called on this input stream.
`long` | `skip(long n)` Skips over and discards `n` bytes of data from this input stream.
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.
From interface `java.io.Closeable`
`abstract void` | `close()` Closes this stream and releases any system resources associated with it.
From interface `java.lang.AutoCloseable`
`abstract void` | `close()` Closes this resource, relinquishing any underlying resources.

## Fields

### buf

    protected final byte[] buf

Input buffer for reading compressed data.

### def

    protected final Deflater def

Compressor for this stream.

## Public constructors

### DeflaterInputStream

    public DeflaterInputStream (InputStream in)

Creates a new input stream with a default compressor and buffer size.

Parameters
`in` | `InputStream`: input stream to read the uncompressed data to

Throws
`NullPointerException` | if `in` is null

### DeflaterInputStream

    public DeflaterInputStream (InputStream in,
                    Deflater defl)

Creates a new input stream with the specified compressor and a default buffer size.

Parameters
`in` | `InputStream`: input stream to read the uncompressed data to
`defl` | `Deflater`: compressor ("deflater") for this stream

Throws
`NullPointerException` | if `in` or `defl` is null

### DeflaterInputStream

    public DeflaterInputStream (InputStream in,
                    Deflater defl,
                    int bufLen)

Creates a new input stream with the specified compressor and buffer size.

Parameters
`in` | `InputStream`: input stream to read the uncompressed data to
`defl` | `Deflater`: compressor ("deflater") for this stream
`bufLen` | `int`: compression buffer size

Throws
`IllegalArgumentException` | if `bufLen <= 0`
`NullPointerException` | if `in` or `defl` is null

## Public methods

### available

    public int available ()

Returns 0 after EOF has been reached, otherwise always return 1.

Programs should not count on this method to return the actual number of bytes that could be read without blocking

Returns
`int` | zero after the end of the underlying input stream has been reached, otherwise always returns 1

Throws
`IOException` | if an I/O error occurs or if this stream is already closed

### close

    public void close ()

Closes this input stream and its underlying input stream, discarding any pending uncompressed data.

Throws
`IOException` | if an I/O error occurs

### mark

    public void mark (int limit)

This operation is not supported.

Parameters
`limit` | `int`: maximum bytes that can be read before invalidating the position marker

### markSupported

    public boolean markSupported ()

Always returns `false` because this input stream does not support the `mark()` and `reset()` methods.

Returns
`boolean` | false, always

### read

    public int read ()

Reads a single byte of compressed data from the input stream. This method will block until some input can be read and compressed.

Returns
`int` | a single byte of compressed data, or -1 if the end of the uncompressed input stream is reached

Throws
`IOException` | if an I/O error occurs or if this stream is already closed

### read

    public int read (byte[] b,
                    int off,
                    int len)

Reads compressed data into a byte array. This method will block until some input can be read and compressed.

Parameters
`b` | `byte`: buffer into which the data is read
`off` | `int`: starting offset of the data within `b`
`len` | `int`: maximum number of compressed bytes to read into `b`

Returns
`int` | the actual number of bytes read, or -1 if the end of the uncompressed input stream is reached

Throws
`IndexOutOfBoundsException` | if `len > b.length - off`
`IOException` | if an I/O error occurs or if this input stream is already closed

### reset

    public void reset ()

This operation is not supported.

Throws
`IOException` | always thrown

### skip

    public long skip (long n)

Skips over and discards data from the input stream. This method may block until the specified number of bytes are read and skipped. Note: While `n` is given as a `long`, the maximum number of bytes which can be skipped is `Integer.MAX_VALUE`.

Parameters
`n` | `long`: number of bytes to be skipped

Returns
`long` | the actual number of bytes skipped

Throws
`IOException` | if an I/O error occurs or if this stream is already closed

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*