Class LZWFilter
java.lang.Object
org.apache.pdfbox.filter.Filter
org.apache.pdfbox.filter.LZWFilter
This is the filter used for the LZWDecode filter.
- Author:
- Ben Litchfield, Tilman Hausherr
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longThe LZW clear table code.static final longThe LZW end of data code.Fields inherited from class Filter
SYSPROP_DEFLATELEVEL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondecode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index) Decodes data, producing the original non-encoded data.protected voidencode(InputStream rawData, OutputStream encoded, COSDictionary parameters) Methods inherited from class Filter
decode, encode, findImageReader, findRasterReader, getCompressionLevel, getDecodeParams
-
Field Details
-
CLEAR_TABLE
public static final long CLEAR_TABLEThe LZW clear table code.- See Also:
-
EOD
public static final long EODThe LZW end of data code.- See Also:
-
-
Constructor Details
-
LZWFilter
public LZWFilter()
-
-
Method Details
-
decode
public DecodeResult decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index) throws IOException Decodes data, producing the original non-encoded data.- Specified by:
decodein classFilter- Parameters:
encoded- the encoded byte streamdecoded- the stream where decoded data will be writtenparameters- the parameters used for decodingindex- the index to the filter being decoded- Returns:
- repaired parameters dictionary, or the original parameters dictionary
- Throws:
IOException- if the stream cannot be decoded
-
encode
protected void encode(InputStream rawData, OutputStream encoded, COSDictionary parameters) throws IOException - Specified by:
encodein classFilter- Throws:
IOException
-