Package org.apache.pdfbox.filter
Class CCITTFaxFilter
java.lang.Object
org.apache.pdfbox.filter.Filter
org.apache.pdfbox.filter.CCITTFaxFilter
Decodes image data that has been encoded using either Group 3 or Group 4
CCITT facsimile (fax) encoding, and encodes image data to Group 4.
-
Field Summary
Fields inherited from class org.apache.pdfbox.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.protected void
encode
(InputStream input, OutputStream encoded, COSDictionary parameters) private void
invertBitmap
(byte[] bufferData) (package private) void
readFromDecoderStream
(CCITTFaxDecoderStream decoderStream, byte[] result) Methods inherited from class org.apache.pdfbox.filter.Filter
decode, encode, findImageReader, getCompressionLevel, getDecodeParams
-
Constructor Details
-
CCITTFaxFilter
CCITTFaxFilter()
-
-
Method Details
-
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 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
-
readFromDecoderStream
- Throws:
IOException
-
invertBitmap
private void invertBitmap(byte[] bufferData) -
encode
protected void encode(InputStream input, OutputStream encoded, COSDictionary parameters) throws IOException - Specified by:
encode
in classFilter
- Throws:
IOException
-