org.apache.pdfbox.filter

## Class JPXFilter

- java.lang.Object
- - org.apache.pdfbox.filter.Filter
  - - org.apache.pdfbox.filter.JPXFilter

    public final class JPXFilter
    extends Filter

Decompress data encoded using the wavelet-based JPEG 2000 standard, reproducing the original data. Requires the Java Advanced Imaging (JAI) Image I/O Tools to be installed from java.net, see jai-imageio. Alternatively you can build from the source available in the jai-imageio-core svn repo. Mac OS X users should download the tar.gz file for linux and unpack it to obtain the required jar files. The .so file can be safely ignored.

Author:
  John Hewson, Timo Boehme

### Field Summary

### Fields inherited from class org.apache.pdfbox.filter.Filter

`SYSPROP_CCITTFAX_MAXBYTES, SYSPROP_DEFLATELEVEL`

### Constructor Summary

Constructors
Constructor and Description
`JPXFilter()`

### Method Summary

All Methods Instance Methods Concrete Methods
`DecodeResult` `decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index)` Decodes data, producing the original non-encoded data.
`DecodeResult` `decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index, DecodeOptions options)` Decodes data, with optional DecodeOptions.
`protected void` `encode(InputStream input, OutputStream encoded, COSDictionary parameters)`

### Methods inherited from class org.apache.pdfbox.filter.Filter

`decode, encode, findImageReader, findRasterReader, getCompressionLevel, getDecodeParams`

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

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

### Constructor Detail

#### JPXFilter

    public JPXFilter()

### Method Detail

#### decode

    public DecodeResult decode(InputStream encoded,
                               OutputStream decoded,
                               COSDictionary parameters,
                               int index,
                               DecodeOptions options)
                        throws IOException

Decodes data, with optional DecodeOptions. Not all filters support all options, and so callers should check the options' `honored` flag to test if they were applied.

Overrides:
  `decode` in class `Filter`
Parameters:
  `encoded` - the encoded byte stream
  `decoded` - the stream where decoded data will be written
  `parameters` - the parameters used for decoding
  `index` - the index to the filter being decoded
  `options` - additional options for decoding
Returns:
  repaired parameters dictionary, or the original parameters dictionary
Throws:
  `IOException` - if the stream cannot be decoded

#### decode

    public DecodeResult decode(InputStream encoded,
                               OutputStream decoded,
                               COSDictionary parameters,
                               int index)
                        throws IOException

Description copied from class: `Filter`
Decodes data, producing the original non-encoded data.

Specified by:
  `decode` in class `Filter`
Parameters:
  `encoded` - the encoded byte stream
  `decoded` - the stream where decoded data will be written
  `parameters` - the parameters used for decoding
  `index` - the index to the filter being decoded
Returns:
  repaired parameters dictionary, or the original parameters dictionary
Throws:
  `IOException` - if the stream cannot be decoded

#### encode

    protected void encode(InputStream input,
                          OutputStream encoded,
                          COSDictionary parameters)
                   throws IOException

Specified by:
  `encode` in class `Filter`
Throws:
  `IOException`