public class PdfDecodeStream
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected PdfFlateFilter |
_flateFilter
A flate filter instance to use for decoding.
|
protected PdfManager |
_m
The manager associated with the PDF document.
|
protected static PdfName |
PDFNAME_FILTER |
protected static PdfName |
PDFNAME_FLATEDECODE |
Constructor and Description |
---|
PdfDecodeStream(PdfManager manager)
Constructs an instance of this class with a specified
manager.
|
Modifier and Type | Method and Description |
---|---|
PdfStream |
decode(PdfStream stream)
Applies a sequence of stream filter decoders to the
specified stream, based on the stream dictionary's Filter
entry, in order to decode the stream.
|
protected static java.util.List |
getFilterList(PdfManager manager,
java.util.Map streamDict)
Extracts the filter list from a stream dictionary map.
|
protected static void |
modifyFilterList(java.util.List filters,
java.util.Map streamDict)
Removes the first element of a filter list, adds the filter
list to a stream dictionary map, and returns the resultant
stream dictionary.
|
protected static final PdfName PDFNAME_FILTER
protected static final PdfName PDFNAME_FLATEDECODE
protected PdfManager _m
protected PdfFlateFilter _flateFilter
public PdfDecodeStream(PdfManager manager)
manager
- the manager instance.public PdfStream decode(PdfStream stream) throws java.io.IOException, PdfFormatException, PdfDecoderException
PdfDecoderNotSupportedException
to indicate that it is
unable to decode the stream. If the stream is not encoded
with any filters, this method returns the original stream
unmodified.stream
- the stream to decode.java.io.IOException
PdfFormatException
PdfDecoderException
protected static void modifyFilterList(java.util.List filters, java.util.Map streamDict) throws PdfFormatException
filters
- the filter list.streamDict
- the stream dictionary map.PdfFormatException
protected static java.util.List getFilterList(PdfManager manager, java.util.Map streamDict) throws java.io.IOException, PdfFormatException
manager
- the manager to use for indirect reference
look-ups.streamDict
- the stream dictionary map.PdfFormatException
java.io.IOException