java.lang.Object
org.sejda.sambox.filter.Filter
org.sejda.sambox.filter.JPXFilter
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.sejda.sambox.filter.Filter
SYSPROP_DEFLATELEVEL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index) Decodes data, producing the original non-encoded data.voidencode(InputStream input, OutputStream encoded, COSDictionary parameters) Encodes data.Methods inherited from class org.sejda.sambox.filter.Filter
findImageReader, getCompressionLevel, getDecodeParams
-
Constructor Details
-
JPXFilter
public JPXFilter()
-
-
Method Details
-
decode
public DecodeResult decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index) throws IOException Decodes 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
Encodes data.
-