Package com.tom_roush.pdfbox.filter
Class JPXFilter
- java.lang.Object
-
- com.tom_roush.pdfbox.filter.Filter
-
- com.tom_roush.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 JP2ForAndroid library to be available from com.gemalto.jp2:jp2-android:1.0.3, see JP2ForAndroid.
-
-
Field Summary
-
Fields inherited from class com.tom_roush.pdfbox.filter.Filter
SYSPROP_DEFLATELEVEL
-
-
Constructor Summary
Constructors Constructor Description JPXFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DecodeResultdecode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index)Decodes data, producing the original non-encoded data.DecodeResultdecode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index, DecodeOptions options)Decodes data, with optional DecodeOptions.protected voidencode(InputStream input, OutputStream encoded, COSDictionary parameters)-
Methods inherited from class com.tom_roush.pdfbox.filter.Filter
encode, getCompressionLevel, getDecodeParams
-
-
-
-
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'honoredflag to test if they were applied.- Overrides:
decodein classFilter- Parameters:
encoded- the encoded byte streamdecoded- the stream where decoded data will be writtenparameters- the parameters used for decodingindex- the index to the filter being decodedoptions- 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:FilterDecodes data, producing the original non-encoded data.- Specified by:
decodein classFilter- Parameters:
encoded- the encoded byte streamdecoded- the stream where decoded data will be writtenparameters- the parameters used for decodingindex- 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:
encodein classFilter- Throws:
IOException
-
-