Class CCITTFaxFilter


  • final class CCITTFaxFilter
    extends Filter
    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.
    • Constructor Detail

      • CCITTFaxFilter

        CCITTFaxFilter()
    • Method Detail

      • 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 class Filter
        Parameters:
        encoded - the encoded byte stream
        decoded - the stream where decoded data will be written
        parameters - the parameters used for decoding
        index - 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
      • readFromDecoderStream

        void readFromDecoderStream​(CCITTFaxDecoderStream decoderStream,
                                   byte[] result)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • invertBitmap

        private void invertBitmap​(byte[] bufferData)
      • encode

        protected void encode​(java.io.InputStream input,
                              java.io.OutputStream encoded,
                              COSDictionary parameters)
                       throws java.io.IOException
        Specified by:
        encode in class Filter
        Throws:
        java.io.IOException