Top Description Fields Constructors Methods
org.apache.pdfbox.filter

public final Class JPXFilter

extends Filter
Class Inheritance
Imports
java.awt.Graphics2D, .Transparency, java.awt.color.ColorSpace, java.awt.image.BufferedImage, .DataBuffer, .DataBufferByte, .DataBufferUShort, .IndexColorModel, .MultiPixelPackedSampleModel, .Raster, java.io.IOException, .InputStream, .OutputStream, javax.imageio.ImageReadParam, .ImageReader, javax.imageio.stream.ImageInputStream, .MemoryCacheImageInputStream, org.apache.pdfbox.cos.COSDictionary, .COSName, org.apache.pdfbox.pdmodel.graphics.color.PDJPXColorSpace

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.
Authors
John Hewson, Timo Boehme

Field Summary

Inherited from org.apache.pdfbox.filter.Filter:
SYSPROP_DEFLATELEVEL

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public DecodeResult
decode(InputStream
the encoded byte stream
encoded
,
OutputStream
the stream where decoded data will be written
decoded
,
COSDictionary
the parameters used for decoding
parameters
,
int
the index to the filter being decoded
index
,
DecodeOptions
additional options for decoding
options
)

Overrides org.apache.pdfbox.filter.Filter.decode.

Decodes data, with optional DecodeOptions.

public DecodeResult
decode(InputStream
the encoded byte stream
encoded
,
OutputStream
the stream where decoded data will be written
decoded
,
COSDictionary
the parameters used for decoding
parameters
,
int
the index to the filter being decoded
index
)

Implements abstract org.apache.pdfbox.filter.Filter.decode.

Decodes data, producing the original non-encoded data.

protected void
private BufferedImage
Inherited from org.apache.pdfbox.filter.Filter:
decodeencodefindImageReaderfindRasterReadergetCompressionLevelgetDecodeParams

Constructor Detail

JPXFilterback to summary
public JPXFilter()

Method Detail

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

Overrides org.apache.pdfbox.filter.Filter.decode.

Doc from org.apache.pdfbox.filter.Filter.decode.

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.

Parameters
encoded:InputStream

the encoded byte stream

decoded:OutputStream

the stream where decoded data will be written

parameters:COSDictionary

the parameters used for decoding

index:int

the index to the filter being decoded

options:DecodeOptions

additional options for decoding

Returns:DecodeResult

repaired parameters dictionary, or the original parameters dictionary

Annotations
@Override
Exceptions
IOException:
if the stream cannot be decoded
decodeback to summary
public DecodeResult decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index) throws IOException

Implements abstract org.apache.pdfbox.filter.Filter.decode.

Doc from org.apache.pdfbox.filter.Filter.decode.

Decodes data, producing the original non-encoded data.

Parameters
encoded:InputStream

the encoded byte stream

decoded:OutputStream

the stream where decoded data will be written

parameters:COSDictionary

the parameters used for decoding

index:int

the index to the filter being decoded

Returns:DecodeResult

repaired parameters dictionary, or the original parameters dictionary

Annotations
@Override
Exceptions
IOException:
if the stream cannot be decoded
encodeback to summary
protected void encode(InputStream input, OutputStream encoded, COSDictionary parameters) throws IOException

Implements abstract org.apache.pdfbox.filter.Filter.encode.

Annotations
@Override
readJPXback to summary
private BufferedImage readJPX(InputStream input, DecodeOptions options, DecodeResult result) throws IOException