Class PdfOutputStream

    • Field Detail

      • stream

        private static final byte[] stream
      • endstream

        private static final byte[] endstream
      • openDict

        private static final byte[] openDict
      • closeDict

        private static final byte[] closeDict
      • endIndirect

        private static final byte[] endIndirect
      • endIndirectWithZeroGenNr

        private static final byte[] endIndirectWithZeroGenNr
      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • document

        protected PdfDocument document
        Document associated with PdfOutputStream.
      • crypto

        protected PdfEncryption crypto
        Contains the business logic for cryptography.
    • Constructor Detail

      • PdfOutputStream

        public PdfOutputStream​(java.io.OutputStream outputStream)
        Create a pdfOutputSteam writing to the passed OutputStream.
        Parameters:
        outputStream - Outputstream to write to.
    • Method Detail

      • write

        public PdfOutputStream write​(PdfObject pdfObject)
        Write a PdfObject to the outputstream.
        Parameters:
        pdfObject - PdfObject to write
        Returns:
        this PdfOutPutStream
      • write

        void write​(long bytes,
                   int size)
            throws java.io.IOException
        Writes corresponding amount of bytes from a given long
        Parameters:
        bytes - a source of bytes, must be >= 0
        size - expected amount of bytes
        Throws:
        java.io.IOException
      • write

        void write​(int bytes,
                   int size)
            throws java.io.IOException
        Writes corresponding amount of bytes from a given int
        Parameters:
        bytes - a source of bytes, must be >= 0
        size - expected amount of bytes
        Throws:
        java.io.IOException
      • write

        private void write​(PdfArray pdfArray)
      • write

        private void write​(PdfLiteral literal)
      • write

        private void write​(PdfString pdfString)
      • write

        private void write​(PdfName name)
      • write

        private void write​(PdfNumber pdfNumber)
      • isNotMetadataPdfStream

        private boolean isNotMetadataPdfStream​(PdfStream pdfStream)
      • isXRefStream

        private boolean isXRefStream​(PdfStream pdfStream)
      • write

        private void write​(PdfStream pdfStream)
      • checkEncryption

        protected boolean checkEncryption​(PdfStream pdfStream)
      • containsFlateFilter

        protected boolean containsFlateFilter​(PdfStream pdfStream)
      • updateCompressionFilter

        protected void updateCompressionFilter​(PdfStream pdfStream)
      • decodeFlateBytes

        protected byte[] decodeFlateBytes​(PdfStream stream,
                                          byte[] bytes)
      • decodeParamsArrayNotFlushed

        private static boolean decodeParamsArrayNotFlushed​(PdfStream pdfStream)