public class FlateDecodeFilter extends MemoryLimitsAwareFilter
Constructor and Description |
---|
FlateDecodeFilter()
Creates a FlateDecodeFilter.
|
FlateDecodeFilter(boolean strictDecoding)
Deprecated.
will be removed in 7.2, use
FlateDecodeStrictFilter instead.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
decode(byte[] b, PdfName filterName, PdfObject decodeParams, PdfDictionary streamDictionary)
Decode the byte[] using the provided filterName.
|
static byte[] |
decodePredictor(byte[] in, PdfObject decodeParams) |
static byte[] |
flateDecode(byte[] in, boolean strict)
A helper to flateDecode.
|
boolean |
isStrictDecoding()
Deprecated.
will be removed in 7.2, use
FlateDecodeStrictFilter instead.
|
FlateDecodeFilter |
setStrictDecoding(boolean strict)
Deprecated.
will be removed in 7.2, use
FlateDecodeStrictFilter instead.
|
enableMemoryLimitsAwareHandler
public FlateDecodeFilter()
@Deprecated public FlateDecodeFilter(boolean strictDecoding)
FlateDecodeStrictFilter
instead.
strictDecoding
- defines whether the decoder will try to read a corrupted stream
@Deprecated public boolean isStrictDecoding()
FlateDecodeStrictFilter
instead.
@Deprecated public FlateDecodeFilter setStrictDecoding(boolean strict)
FlateDecodeStrictFilter
instead.
strict
- true if the decoder should try to read a corrupted stream otherwise false
public byte[] decode(byte[] b, PdfName filterName, PdfObject decodeParams, PdfDictionary streamDictionary)
b
- the bytes that need to be decoded
filterName
- PdfName of the filter
decodeParams
- decode parameters
streamDictionary
- the dictionary of the stream. Can contain additional information needed to decode the byte[].
public static byte[] flateDecode(byte[] in, boolean strict)
in
- the input data
strict
- true
to read a correct stream. false
to try to read a corrupted stream.
public static byte[] decodePredictor(byte[] in, PdfObject decodeParams)
in
- Input byte array.
decodeParams
- PdfDictionary of decodeParams.
Copyright © 1998–2020 iText Group NV. All rights reserved.