Interface Filter

  • All Known Implementing Classes:
    ASCII85DecodeFilter, ASCIIHexDecodeFilter, FlateDecodeFilter

    public interface Filter
    A single PDF stream filter (the algorithms named by /Filter entries, e.g. FlateDecode). Implementations only need to support decoding; this package is a reader, not a PDF writer/optimizer.
    • Method Detail

      • decode

        byte[] decode​(byte[] encoded,
                      COSDictionary parameters,
                      COSDictionary streamDict)
               throws java.io.IOException,
                      COSException
        Decodes encoded using this filter's algorithm.
        Parameters:
        encoded - the filtered bytes, as stored in the file
        parameters - this filter's DecodeParms dictionary (never null; empty if the stream had none)
        streamDict - the owning stream's full dictionary, in case a filter needs sibling entries (unused by the filters implemented here, but kept for extensibility/parity with PDFBox's Filter API)
        Throws:
        java.io.IOException
        COSException