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.
|
protected static byte[] |
flateDecodeInternal(byte[] in, boolean strict, ByteArrayOutputStream out)
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.
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.
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[].
@Deprecated public FlateDecodeFilter setStrictDecoding(boolean strict)
FlateDecodeStrictFilter
instead.
strict
- true if the decoder should try to read a corrupted stream otherwise false
protected static byte[] flateDecodeInternal(byte[] in, boolean strict, ByteArrayOutputStream out)
in
- the input data
strict
- true
to read a correct stream. false
to try to read a corrupted stream.
out
- the out stream which will be used to write the bytes.
Copyright © 1998–2023 iText Group NV. All rights reserved.