Package com.tom_roush.pdfbox.filter
Class LZWFilter
- java.lang.Object
-
- com.tom_roush.pdfbox.filter.Filter
-
- com.tom_roush.pdfbox.filter.LZWFilter
-
public class LZWFilter extends Filter
This is the filter used for the LZWDecode filter.
-
-
Field Summary
Fields Modifier and Type Field Description static longCLEAR_TABLEThe LZW clear table code.static longEODThe LZW end of data code.-
Fields inherited from class com.tom_roush.pdfbox.filter.Filter
SYSPROP_DEFLATELEVEL
-
-
Constructor Summary
Constructors Constructor Description LZWFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DecodeResultdecode(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 com.tom_roush.pdfbox.filter.Filter
decode, encode, getCompressionLevel, getDecodeParams
-
-
-
-
Field Detail
-
CLEAR_TABLE
public static final long CLEAR_TABLE
The LZW clear table code.- See Also:
- Constant Field Values
-
EOD
public static final long EOD
The LZW end of data code.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
-