public class FlateDecodeFilter extends Object implements IFilterHandler
| Constructor and Description |
|---|
FlateDecodeFilter()
Creates a FlateDecodeFilter.
|
FlateDecodeFilter(boolean strictDecoding)
Creates a FlateDecodeFilter.
|
| 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()
Checks whether the decoder will try to read a corrupted stream (not strict) or not (strict)
|
FlateDecodeFilter |
setStrictDecoding(boolean strict)
Defines how the corrupted streams should be treated.
|
public FlateDecodeFilter()
public FlateDecodeFilter(boolean strictDecoding)
strictDecoding - defines whether the decoder will try to read a corrupted streampublic boolean isStrictDecoding()
public FlateDecodeFilter setStrictDecoding(boolean strict)
strict - true if the decoder should try to read a corrupted stream otherwise falsepublic byte[] decode(byte[] b,
PdfName filterName,
PdfObject decodeParams,
PdfDictionary streamDictionary)
IFilterHandlerdecode in interface IFilterHandlerb - the bytes that need to be decodedfilterName - PdfName of the filterdecodeParams - decode parametersstreamDictionary - 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 datastrict - 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–2019 iText Group NV. All rights reserved.