iTextSharp.text.pdf.codec.BitFile.Flush C# (CSharp) Méthode

Flush() public méthode

public Flush ( ) : void
Résultat void
        public void Flush()
        {
            int numBytes = index_ + (bitsLeft_ == 8 ? 0 : 1);
            if (numBytes > 0) {
                if (blocks_)
                    output_.WriteByte((byte)numBytes);
                output_.Write(buffer_, 0, numBytes);
                buffer_[0] = 0;
                index_ = 0;
                bitsLeft_ = 8;
            }
        }

Usage Example

Exemple #1
0
        /**
         * Indicate to compressor that no more data to go so write outp
         * any remaining buffered data.
         *
         * @exception IOException if underlying output stream error
         **/
        public void Flush()
        {
            if (prefix_ != -1)
            {
                bf_.WriteBits(prefix_, numBits_);
            }

            bf_.WriteBits(endOfInfo_, numBits_);
            bf_.Flush();
        }