org.apache.pdfbox.filter

## Class FlateFilterDecoderStream

- java.lang.Object
- - java.io.InputStream
  - - java.io.FilterInputStream
    - - org.apache.pdfbox.filter.FlateFilterDecoderStream

All Implemented Interfaces:
  Closeable, AutoCloseable

    public final class FlateFilterDecoderStream
    extends FilterInputStream

Stream based decoder for the flate filter which uses zlib/deflate compression. Use Inflater instead of InflateInputStream to avoid an EOFException due to a probably missing Z_STREAM_END, see PDFBOX-1232 for details.

### Field Summary

### Fields inherited from class java.io.FilterInputStream

`in`

### Constructor Summary

Constructors
Constructor and Description
`FlateFilterDecoderStream(InputStream inputStream)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `available()` Unsupported.
`void` `close()` This will close the underlying stream and release any resources.
`void` `mark(int readlimit)` Unsupported.
`boolean` `markSupported()` mark/reset isn't supported.
`int` `read()` This will read the next byte from the stream.
`int` `read(byte[] data, int offset, int length)` This will read a chunk of data.
`void` `reset()` Unsupported.
`long` `skip(long n)` Unsupported.

### Methods inherited from class java.io.FilterInputStream

`read`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### FlateFilterDecoderStream

    public FlateFilterDecoderStream(InputStream inputStream)
                             throws IOException

Constructor.

Parameters:
  `inputStream` - The input stream to actually read from.
Throws:
  `IOException`

### Method Detail

#### read

    public int read()
             throws IOException

This will read the next byte from the stream.

Overrides:
  `read` in class `FilterInputStream`
Returns:
  The next byte read from the stream.
Throws:
  `IOException` - If there is an error reading from the wrapped stream.

#### read

    public int read(byte[] data,
                    int offset,
                    int length)
             throws IOException

This will read a chunk of data.

Overrides:
  `read` in class `FilterInputStream`
Parameters:
  `data` - The buffer to write data to.
  `offset` - The offset into the data stream.
  `length` - The number of byte to attempt to read.
Returns:
  The number of bytes actually read.
Throws:
  `IOException` - If there is an error reading data from the underlying stream.

#### close

    public void close()
               throws IOException

This will close the underlying stream and release any resources.

Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `AutoCloseable`
Overrides:
  `close` in class `FilterInputStream`
Throws:
  `IOException` - If there is an error closing the underlying stream.

#### markSupported

    public boolean markSupported()

mark/reset isn't supported.

Overrides:
  `markSupported` in class `FilterInputStream`
Returns:
  always false.

#### skip

    public long skip(long n)

Unsupported.

Overrides:
  `skip` in class `FilterInputStream`
Parameters:
  `n` - ignored.
Returns:
  always zero.

#### available

    public int available()

Unsupported.

Overrides:
  `available` in class `FilterInputStream`
Returns:
  always zero.

#### mark

    public void mark(int readlimit)

Unsupported.

Overrides:
  `mark` in class `FilterInputStream`
Parameters:
  `readlimit` - ignored.

#### reset

    public void reset()
               throws IOException

Unsupported.

Overrides:
  `reset` in class `FilterInputStream`
Throws:
  `IOException` - always throw as reset is an unsupported feature.