Package com.itextpdf.kernel.pdf.filters
Class LZWDecodeFilter
java.lang.Object
com.itextpdf.kernel.pdf.MemoryLimitsAwareFilter
com.itextpdf.kernel.pdf.filters.LZWDecodeFilter
- All Implemented Interfaces:
IFilterHandler
Handles LZWDECODE filter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
decode
(byte[] b, PdfName filterName, PdfObject decodeParams, PdfDictionary streamDictionary) Decode the byte[] using the provided filterName.static byte[]
LZWDecode
(byte[] in) Decodes a byte[] according to the LZW encoding.private static byte[]
LZWDecodeInternal
(byte[] in, ByteArrayOutputStream out) Decodes a byte[] according to the LZW encoding.Methods inherited from class com.itextpdf.kernel.pdf.MemoryLimitsAwareFilter
enableMemoryLimitsAwareHandler
-
Constructor Details
-
LZWDecodeFilter
public LZWDecodeFilter()
-
-
Method Details
-
LZWDecode
public static byte[] LZWDecode(byte[] in) Decodes a byte[] according to the LZW encoding.- Parameters:
in
- byte[] to be decoded- Returns:
- decoded byte[]
-
decode
public byte[] decode(byte[] b, PdfName filterName, PdfObject decodeParams, PdfDictionary streamDictionary) Decode the byte[] using the provided filterName.- Parameters:
b
- 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[].- Returns:
- decoded byte array
-
LZWDecodeInternal
Decodes a byte[] according to the LZW encoding.- Parameters:
in
- byte[] to be decodedout
- the out stream which will be used to write the bytes.- Returns:
- decoded byte[]
-