Package org.apache.pdfbox.filter
Class JBIG2Filter
- java.lang.Object
-
- org.apache.pdfbox.filter.Filter
-
- org.apache.pdfbox.filter.JBIG2Filter
-
final class JBIG2Filter extends Filter
Decompresses data encoded using the JBIG2 standard, reproducing the original monochrome (1 bit per pixel) image data (or an approximation of that data). Requires a JBIG2 plugin for Java Image I/O to be installed. A known working plug-in is the Apache PDFBox JBIG2 plugin.
-
-
Field Summary
Fields Modifier and Type Field Description private static boolean
levigoLogged
private static org.apache.commons.logging.Log
LOG
-
Fields inherited from class org.apache.pdfbox.filter.Filter
SYSPROP_DEFLATELEVEL
-
-
Constructor Summary
Constructors Constructor Description JBIG2Filter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DecodeResult
decode(java.io.InputStream encoded, java.io.OutputStream decoded, COSDictionary parameters, int index)
Decodes data, producing the original non-encoded data.DecodeResult
decode(java.io.InputStream encoded, java.io.OutputStream decoded, COSDictionary parameters, int index, DecodeOptions options)
Decodes data, with optional DecodeOptions.protected void
encode(java.io.InputStream input, java.io.OutputStream encoded, COSDictionary parameters)
private static void
logLevigoDonated()
-
Methods inherited from class org.apache.pdfbox.filter.Filter
encode, findImageReader, getCompressionLevel, getDecodeParams
-
-
-
-
Method Detail
-
logLevigoDonated
private static void logLevigoDonated()
-
decode
public DecodeResult decode(java.io.InputStream encoded, java.io.OutputStream decoded, COSDictionary parameters, int index, DecodeOptions options) throws java.io.IOException
Description copied from class:Filter
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 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:
java.io.IOException
- if the stream cannot be decoded
-
decode
public DecodeResult decode(java.io.InputStream encoded, java.io.OutputStream decoded, COSDictionary parameters, int index) throws java.io.IOException
Description copied from class:Filter
Decodes data, producing the original non-encoded data.- Specified by:
decode
in 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:
java.io.IOException
- if the stream cannot be decoded
-
encode
protected void encode(java.io.InputStream input, java.io.OutputStream encoded, COSDictionary parameters) throws java.io.IOException
-
-